@@ -38,6 +38,10 @@ testEnd(loopTest, "loop test")
38
38
testStart (nestingTest , "nesting test" )
39
39
testEnd (nestingTest , "nesting test" )
40
40
41
+ // Single Iteration prints
42
+ testStart (singleIterationTest , "single iteration test" )
43
+ testEnd (singleIterationTest , "single iteration test" )
44
+
41
45
// Char table prints
42
46
testStart (charTableTest , "char table test" )
43
47
testEnd (charTableTest , "char table test" )
@@ -75,6 +79,11 @@ int testNestedLoop(int) {
75
79
return 0 ;
76
80
}
77
81
82
+ int testSingleIteration (int ) {
83
+ ASSERT_M (v == 1 , "Expected to loop 1 time, looped %i time(s) instead" , v );
84
+ return 0 ;
85
+ }
86
+
78
87
// Char table testing
79
88
int capitalShiftTest (int ) {
80
89
ASSERT (Key_a == charToPressCMD ['a' ].c );
@@ -124,6 +133,15 @@ void test_main() {
124
133
funcCMD (testNestedLoop ),
125
134
funcCMD (nestingTestEnd ),
126
135
136
+ funcCMD (vReset ),
137
+ // Single iteration test
138
+ funcCMD (singleIterationTestStart ),
139
+ loopStartCMD (1 ),
140
+ funcCMD (vInc ),
141
+ loopEndCMD (),
142
+ funcCMD (testSingleIteration ),
143
+ funcCMD (singleIterationTestEnd ),
144
+
127
145
// Char table values test
128
146
funcCMD (charTableTestStart ),
129
147
funcCMD (capitalShiftTest ),
0 commit comments