| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // Copyright (c) 2021-2025 ChilliBits. All rights reserved. | ||
| 2 | |||
| 3 | #include <gtest/gtest.h> | ||
| 4 | |||
| 5 | #include <util/SystemUtil.h> | ||
| 6 | |||
| 7 | namespace spice::testing { | ||
| 8 | |||
| 9 | using namespace spice::compiler; | ||
| 10 | |||
| 11 | 4 | TEST(SystemUtilTest, IsCommandAvailable) { | |
| 12 |
4/16✓ Branch 4 → 5 taken 1 time.
✗ Branch 4 → 52 not taken.
✓ Branch 5 → 6 taken 1 time.
✗ Branch 5 → 50 not taken.
✗ Branch 10 → 11 not taken.
✓ Branch 10 → 20 taken 1 time.
✗ Branch 11 → 12 not taken.
✗ Branch 11 → 65 not taken.
✗ Branch 12 → 13 not taken.
✗ Branch 12 → 61 not taken.
✗ Branch 14 → 15 not taken.
✗ Branch 14 → 59 not taken.
✗ Branch 15 → 16 not taken.
✗ Branch 15 → 57 not taken.
✓ Branch 22 → 23 taken 1 time.
✗ Branch 22 → 27 not taken.
|
2 | ASSERT_TRUE(SystemUtil::isCommandAvailable("dot")); |
| 13 |
4/16✓ Branch 26 → 28 taken 1 time.
✗ Branch 26 → 71 not taken.
✓ Branch 28 → 29 taken 1 time.
✗ Branch 28 → 69 not taken.
✗ Branch 33 → 34 not taken.
✓ Branch 33 → 43 taken 1 time.
✗ Branch 34 → 35 not taken.
✗ Branch 34 → 84 not taken.
✗ Branch 35 → 36 not taken.
✗ Branch 35 → 80 not taken.
✗ Branch 37 → 38 not taken.
✗ Branch 37 → 78 not taken.
✗ Branch 38 → 39 not taken.
✗ Branch 38 → 76 not taken.
✓ Branch 45 → 46 taken 1 time.
✗ Branch 45 → 48 not taken.
|
2 | ASSERT_FALSE(SystemUtil::isCommandAvailable("non-existing-command")); |
| 14 | } | ||
| 15 | |||
| 16 | 4 | TEST(SystemUtilTest, IsGraphvizInstalled) { | |
| 17 |
3/14✓ Branch 2 → 3 taken 1 time.
✗ Branch 2 → 22 not taken.
✗ Branch 5 → 6 not taken.
✓ Branch 5 → 15 taken 1 time.
✗ Branch 6 → 7 not taken.
✗ Branch 6 → 31 not taken.
✗ Branch 7 → 8 not taken.
✗ Branch 7 → 27 not taken.
✗ Branch 9 → 10 not taken.
✗ Branch 9 → 25 not taken.
✗ Branch 10 → 11 not taken.
✗ Branch 10 → 23 not taken.
✓ Branch 17 → 18 taken 1 time.
✗ Branch 17 → 20 not taken.
|
1 | ASSERT_TRUE(SystemUtil::isGraphvizInstalled()); |
| 18 | } | ||
| 19 | |||
| 20 | } // namespace spice::testing | ||
| 21 |