Skip to content

Commit 83c1726

Browse files
committed
Simplified and redesigned test outputs
Also includes: * Corresponding update to integration test output expectations.
1 parent 6dfaea3 commit 83c1726

10 files changed

+142
-223
lines changed

tests/exps/basic_failures.exp

-245 Bytes
Binary file not shown.

tests/exps/basic_passing.exp

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,7 @@
1-
  basic:scaler_tests_ints 
2-
Pass: 1 != 2
3-
Pass: 3 == 3
4-
Pass: 2 >= 2
5-
Pass: 3 >= 2
6-
Pass: 2 <= 2
7-
Pass: -2 <= 2
8-
Pass: -1 < 0
9-
Pass: 3 > 1
10-
All test expectations passed [0 of 8 failed]
11-
  basic:scaler_tests_floats 
12-
Pass: 1.0 != 2.0
13-
Pass: 1.1234 > 1.12
14-
Pass: 1.1234 <= 1.12
15-
Pass: 0.0 == 0.0
16-
All test expectations passed [0 of 4 failed]
17-
  basic:string_tests 
18-
Pass: string1 == "Earth"
19-
Pass: string1 != "Mars"
20-
Pass: string1 != "earth"
21-
All test expectations passed [0 of 3 failed]
22-
  basic:memory_tests 
23-
Pass: buffer1 == buffer2
24-
Pass: buffer1 != buffer3
25-
All test expectations passed [0 of 2 failed]
1+
  basic:scaler_tests_ints  OK [0 of 8 failed]
2+
  basic:scaler_tests_floats  OK [0 of 4 failed]
3+
  basic:string_tests  OK [0 of 3 failed]
4+
  basic:memory_tests  OK [0 of 2 failed]
265

27-
 Tests Summary 
28-
All tests passed [0 of 4 failed]
6+
All tests passed [0 of 4 failed]
297

Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,40 @@
1-
  mock:must_never_call 
2-
** FAIL ** : Expectation not met : Called, when should be never called: func_extern_3()
3-
At: ./tests/mocking_interaction_validation_failures.c:24
4-
Some test expectations failed [1 of 1 failed]
5-
  mock:must_never_call_with_arguments 
6-
** FAIL ** : Expectation not met : Called, when should be never called: func_extern_2( 1,0)
7-
At: ./tests/mocking_interaction_validation_failures.c:34
8-
** FAIL ** : Expectation not met : Called, when should be never called: func_extern_2( 0,1)
9-
At: ./tests/mocking_interaction_validation_failures.c:33
10-
Some test expectations failed [2 of 2 failed]
11-
  mock:must_call_in_order 
12-
** FAIL ** : Expectation not met : Never called/called out of order: func_extern_2( 1,0)
13-
At ./tests/mocking_interaction_validation_failures.c:43
14-
Some test expectations failed [1 of 2 failed]
15-
  mock:must_call_any_order 
16-
** FAIL ** : Expectation not met : Never called: func_extern_2( !,2)
17-
At: ./tests/mocking_interaction_validation_failures.c:52
18-
** FAIL ** : Expectation not met : Never called: func_extern_2( 2,0)
19-
At: ./tests/mocking_interaction_validation_failures.c:53
20-
Some test expectations failed [2 of 2 failed]
21-
  mock:must_call_any_order_at_least_times 
22-
** FAIL ** : Expectation not met : Never called: func_extern_2( !,!)
23-
At: ./tests/mocking_interaction_validation_failures.c:62
24-
Some test expectations failed [1 of 3 failed]
25-
  mock:must_call_in_order_at_least_times 
26-
** FAIL ** : Expectation not met : Never called/called out of order: func_extern_2( !,!)
27-
At ./tests/mocking_interaction_validation_failures.c:72
28-
** FAIL ** : Expectation not met : Never called/called out of order: func_extern_3()
29-
At ./tests/mocking_interaction_validation_failures.c:74
30-
** FAIL ** : Expectation not met : Never called/called out of order: func_extern_3()
31-
At ./tests/mocking_interaction_validation_failures.c:74
32-
Some test expectations failed [3 of 5 failed]
1+
  mock:must_never_call 
2+
FAILED Expectation not met : Called, when should be never called: func_extern_3()
3+
At: ./tests/mocking_interaction_validation_failures.c:24
4+
1 of 1 failed
5+
  mock:must_never_call_with_arguments 
6+
FAILED Expectation not met : Called, when should be never called: func_extern_2( 1,0)
7+
At: ./tests/mocking_interaction_validation_failures.c:34
8+
FAILED Expectation not met : Called, when should be never called: func_extern_2( 0,1)
9+
At: ./tests/mocking_interaction_validation_failures.c:33
10+
2 of 2 failed
11+
  mock:must_call_in_order 
12+
FAILED Expectation not met : Never called/called out of order: func_extern_2( 1,0)
13+
At ./tests/mocking_interaction_validation_failures.c:43
14+
1 of 2 failed
15+
  mock:must_call_any_order 
16+
FAILED Expectation not met : Never called: func_extern_2( !,2)
17+
At: ./tests/mocking_interaction_validation_failures.c:52
18+
FAILED Expectation not met : Never called: func_extern_2( 2,0)
19+
At: ./tests/mocking_interaction_validation_failures.c:53
20+
2 of 2 failed
21+
  mock:must_call_any_order_at_least_times 
22+
FAILED Expectation not met : Never called: func_extern_2( !,!)
23+
At: ./tests/mocking_interaction_validation_failures.c:62
24+
1 of 3 failed
25+
  mock:must_call_in_order_at_least_times 
26+
FAILED Expectation not met : Never called/called out of order: func_extern_2( !,!)
27+
At ./tests/mocking_interaction_validation_failures.c:72
28+
FAILED Expectation not met : Never called/called out of order: func_extern_3()
29+
At ./tests/mocking_interaction_validation_failures.c:74
30+
FAILED Expectation not met : Never called/called out of order: func_extern_3()
31+
At ./tests/mocking_interaction_validation_failures.c:74
32+
3 of 5 failed
3333

34-
 Tests Summary 
35-
Not all tests passed [6 of 6 failed]
36-
* 'must_never_call [1/1]' test failed
37-
* 'must_never_call_with_arguments [1/1]' test failed
38-
* 'must_call_in_order [1/1]' test failed
39-
* 'must_call_any_order [1/1]' test failed
40-
* 'must_call_any_order_at_least_times [1/1]' test failed
41-
* 'must_call_in_order_at_least_times [1/1]' test failed
34+
Not all tests passed [6 of 6 failed]
35+
* 'must_never_call [1/1]' test failed
36+
* 'must_never_call_with_arguments [1/1]' test failed
37+
* 'must_call_in_order [1/1]' test failed
38+
* 'must_call_any_order [1/1]' test failed
39+
* 'must_call_any_order_at_least_times [1/1]' test failed
40+
* 'must_call_in_order_at_least_times [1/1]' test failed
Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
  mock:must_call_in_order 
2-
** FAIL ** : Expectation not met : Never called/called out of order: func_extern_1()
3-
At ./tests/mocking_interaction_validation_failures_2.c:22
4-
** FAIL ** : Expectation not met : Never called/called out of order: func_extern_2( 1,!)
5-
At ./tests/mocking_interaction_validation_failures_2.c:23
1+
  mock:must_call_in_order 
2+
FAILED Expectation not met : Never called/called out of order: func_extern_1()
3+
At ./tests/mocking_interaction_validation_failures_2.c:22
4+
FAILED Expectation not met : Never called/called out of order: func_extern_2( 1,!)
5+
At ./tests/mocking_interaction_validation_failures_2.c:23
66
Actual order of functions calls was the following:
77
* func_extern_2( 0,0)
88
* func_extern_1( 0,0)
99

10-
Some test expectations failed [2 of 2 failed]
10+
2 of 2 failed
1111

12-
 Tests Summary 
13-
Not all tests passed [1 of 1 failed]
14-
* 'must_call_in_order [1/1]' test failed
12+
Not all tests passed [1 of 1 failed]
13+
* 'must_call_in_order [1/1]' test failed
Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
1-
  mock:must_never_call 
2-
All test expectations passed [0 of 1 failed]
3-
  mock:must_never_call_with_arguments 
4-
All test expectations passed [0 of 2 failed]
5-
  mock:must_call_in_order 
6-
All test expectations passed [0 of 2 failed]
7-
  mock:must_call_any_order 
8-
All test expectations passed [0 of 2 failed]
9-
  mock:must_call_any_order_at_least_times 
10-
All test expectations passed [0 of 3 failed]
11-
  mock:must_call_in_order_at_least_times 
12-
All test expectations passed [0 of 3 failed]
1+
  mock:must_never_call  OK [0 of 1 failed]
2+
  mock:must_never_call_with_arguments  OK [0 of 2 failed]
3+
  mock:must_call_in_order  OK [0 of 2 failed]
4+
  mock:must_call_any_order  OK [0 of 2 failed]
5+
  mock:must_call_any_order_at_least_times  OK [0 of 3 failed]
6+
  mock:must_call_in_order_at_least_times  OK [0 of 3 failed]
137

14-
 Tests Summary 
15-
All tests passed [0 of 6 failed]
8+
All tests passed [0 of 6 failed]
169

tests/exps/mocking_success.exp

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
1-
  mock:mock_return_value 
2-
Pass: sut_func (0, 0) == 0xFABC
3-
All test expectations passed [0 of 1 failed]
4-
  mock:mock_handler 
5-
Pass: a == 0x1111
6-
Pass: b == 0x2222
7-
Pass: sut_func (0x1111, 0x2222) == 0x3333
8-
All test expectations passed [0 of 3 failed]
9-
  mock:mock_handler_resource_passing 
10-
Pass: *(int*)func_extern_1_fake.resources == 0x1212
11-
Pass: sut_func (0, 0) == 0
12-
All test expectations passed [0 of 2 failed]
1+
  mock:mock_return_value  OK [0 of 1 failed]
2+
  mock:mock_handler  OK [0 of 3 failed]
3+
  mock:mock_handler_resource_passing  OK [0 of 2 failed]
134

14-
 Tests Summary 
15-
All tests passed [0 of 3 failed]
5+
All tests passed [0 of 3 failed]
166

tests/exps/parameterised_test.exp

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
1-
  add:add_numbers [5 tests] 
2-
  [1/5] add:add_numbers 
3-
Pass: add (n1, n2) == exp
4-
All test expectations passed [0 of 1 failed]
5-
  [2/5] add:add_numbers 
6-
Pass: add (n1, n2) == exp
7-
All test expectations passed [0 of 1 failed]
8-
  [3/5] add:add_numbers 
9-
Pass: add (n1, n2) == exp
10-
All test expectations passed [0 of 1 failed]
11-
  [4/5] add:add_numbers 
12-
Pass: add (n1, n2) == exp
13-
All test expectations passed [0 of 1 failed]
14-
  [5/5] add:add_numbers 
15-
Pass: add (n1, n2) == exp
16-
All test expectations passed [0 of 1 failed]
1+
  add:add_numbers  [5 tests] 
2+
  [1/5] add:add_numbers  OK [0 of 1 failed]
3+
  [2/5] add:add_numbers  OK [0 of 1 failed]
4+
  [3/5] add:add_numbers  OK [0 of 1 failed]
5+
  [4/5] add:add_numbers  OK [0 of 1 failed]
6+
  [5/5] add:add_numbers  OK [0 of 1 failed]
177

18-
 Tests Summary 
19-
All tests passed [0 of 5 failed]
8+
All tests passed [0 of 5 failed]
209

tests/exps/strip_prefix_1.exp

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
1-
  add:add_numbers [5 tests] 
2-
  [1/5] add:add_numbers 
3-
Pass: add (n1, n2) == exp
4-
All test expectations passed [0 of 1 failed]
5-
  [2/5] add:add_numbers 
6-
Pass: add (n1, n2) == exp
7-
All test expectations passed [0 of 1 failed]
8-
  [3/5] add:add_numbers 
9-
Pass: add (n1, n2) == exp
10-
All test expectations passed [0 of 1 failed]
11-
  [4/5] add:add_numbers 
12-
Pass: add (n1, n2) == exp
13-
All test expectations passed [0 of 1 failed]
14-
  [5/5] add:add_numbers 
15-
Pass: add (n1, n2) == exp
16-
All test expectations passed [0 of 1 failed]
1+
  add:add_numbers  [5 tests] 
2+
  [1/5] add:add_numbers  OK [0 of 1 failed]
3+
  [2/5] add:add_numbers  OK [0 of 1 failed]
4+
  [3/5] add:add_numbers  OK [0 of 1 failed]
5+
  [4/5] add:add_numbers  OK [0 of 1 failed]
6+
  [5/5] add:add_numbers  OK [0 of 1 failed]
177

18-
 Tests Summary 
19-
All tests passed [0 of 5 failed]
8+
All tests passed [0 of 5 failed]
209

tests/exps/strip_prefix_2.exp

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
1-
  mock:must_never_call 
2-
All test expectations passed [0 of 1 failed]
3-
  mock:must_never_call_with_arguments 
4-
All test expectations passed [0 of 2 failed]
5-
  mock:must_call_in_order 
6-
All test expectations passed [0 of 2 failed]
7-
  mock:must_call_any_order 
8-
All test expectations passed [0 of 2 failed]
9-
  mock:must_call_any_order_at_least_times 
10-
All test expectations passed [0 of 3 failed]
11-
  mock:must_call_in_order_at_least_times 
12-
All test expectations passed [0 of 3 failed]
1+
  mock:must_never_call  OK [0 of 1 failed]
2+
  mock:must_never_call_with_arguments  OK [0 of 2 failed]
3+
  mock:must_call_in_order  OK [0 of 2 failed]
4+
  mock:must_call_any_order  OK [0 of 2 failed]
5+
  mock:must_call_any_order_at_least_times  OK [0 of 3 failed]
6+
  mock:must_call_in_order_at_least_times  OK [0 of 3 failed]
137

14-
 Tests Summary 
15-
All tests passed [0 of 6 failed]
8+
All tests passed [0 of 6 failed]
169

0 commit comments

Comments
 (0)