Lines Matching refs:run

8   var run = window.calculatorTestRun.create();
13 run.test('Twenty eight can be divided by three', '28 / 3 = [9.3333333]');
14 run.test('Twenty nine can be divided by three', '29 / 3 = [9.6666667]');
15 run.test('Thirty can be divided by three', '30 / 3 = [10]');
16 run.test('Thirty one can be divided by three', '31 / 3 = [10.333333]');
17 run.test('Thirty two can be divided by three', '32 / 3 = [10.666667]');
18 run.test('Thirty three can be divided by three', '33 / 3 = [11]');
23 // run.test('Equals without operator results in operand value',
26 // run.test('Operations without operands uses default operands',
30 // run.test('Successive operators replace each other.',
36 // run.test('Operand can be erased and replaced',
40 // run.test('Operators can be erased and replaced.',
44 // run.test('Erase is ignored after equals.', '123 + 456 = < [579]');
45 // run.test('Erase is ignored after zero result.', '123 - 123 = < [9]');
48 // run.test('Erasing an operand makes it blank.',
54 // run.test('Negation applies to zero', '~ [[-0]]');
55 // run.test('Negation applies before input', '~ 123 = [[-123]]');
56 // run.test('Negation applies after input is erased',
58 // run.test('Negation is preserved when input is erased',
60 // run.test('Negation supports small values',
63 // run.test('Addition resets negated zeros', '~ + [_ + [0]]');
64 // run.test('Subtraction resets negated zeros', '~ - [_ - [0]]');
65 // run.test('Multiplication resets negated zeros', '~ * [_ * [0]]');
66 // run.test('Division resets negated zeros', '~ / [_ / [0]]');
67 // run.test('Equals resets negated zeros', '~ = [0 _ [0]]');
74 // run.test('Errors results are spelled out', '1 / 0 = [[error]]');
75 // run.test('Addition treats errors as zero',
77 // run.test('Subtraction treats errors as zero',
79 // run.test('Multiplication treats errors as zero',
81 // run.test('Division treats errors as zero',
83 // run.test('Equals treats errors as zero',
89 // run.test('Common operations are reversible',
92 // run.test('Large numbers are displayed as exponentials',
94 // run.test('Small numbers are displayed as exponentials',
102 run.test("Initialization", function(controller) {
103 run.verify(null, controller.model.accumulator, 'Accumulator');
104 run.verify(null, controller.model.operator, 'Operator');
105 run.verify(null, controller.model.operand, 'Operand');
106 run.verify(null, controller.model.defaults.operator, 'Default Operator');
107 run.verify(null, controller.model.defaults.operand, 'Defaults Operand');
110 run.test("AC", '1 + 2 = [3] 4 A [[_ _ 0]]');
112 run.test("back", '1 + 2 < [_ + _] < [_ _ _] < [_ _ 0]');
117 run.test("Miscellaneous Test A",
128 run.test("Miscellaneous Test B", '2 * = [4] * [_ * _] = [16] = [64]');
130 run.test("Miscellaneous Test C", '0.020202020 [_ _ 0.0202020==]');
132 run.test("Miscellaneous Test D", '.2 [_ _ 0 .2]');
134 run.test("Miscellaneous Test E", '0.00000014 [_ _ 0.0000001=]');
136 run.test("Miscellaneous Test F", '0.10000004 [_ _ 0.1000000=]');
138 run.test("Miscellaneous Test G", '0.12312312 [_ _ 0.1231231=]');
140 run.test("Miscellaneous Test H", '1.231231234 [_ _ 1.2312312==]');
142 run.test("Miscellaneous Test I", '123.1231234 [_ _ 123.12312==]');
144 run.test("Miscellaneous Test J", '123123.1234 [_ _ 123123.12==]');
146 run.test("Miscellaneous Test K", '12312312.34 [_ _ 12312312.==]');
148 run.test("Miscellaneous Test L", '12312312.04 [_ _ 12312312.==]');
150 run.test("Miscellaneous Test M", '1231231234 [_ _ 12312312==]');
152 run.test("Miscellaneous Test N", '1 + 1 + [[1 _ 1][2 + 1][_ + _]] = [4]');
154 run.test("Miscellaneous Test O", '1 + 1 [_ + 1] 2 [_ + 1 2]');
156 run.test("Positive + Positive", '82959 + 4 = [82963]');
158 run.test("Positive + Negative", '123 + 456~ = [-333]');
160 run.test("Negative + Positive", '502~ + 385 = [-117]');
162 run.test("Negative + Negative", '4296~ + 32~ = [-4328]');
164 run.test("Positive + Zero", '23650 + 0 = [23650]');
166 run.test("Negative + Zero", '489719~ + 0 = [-489719]');
168 run.test("Zero + Positive", '0 + 4296 = [4296]');
170 run.test("Zero + Negative", '0 + 322~ = [-322]');
172 run.test("Zero + Zero", '0 + 0 = [0]');
174 run.test("Addition Chain",
177 run.test("Positive - Positive", '4534 - 327 = [4207]');
179 run.test("Subtraction Chain",
182 run.test("Positive * Positive", '7459 * 660 = [4922940]');
184 run.test("Multiplication Chain",
188 run.test("Positive / Positive", '181 / 778 = [0.2326478]');
190 run.test("Division Chain",
194 run.test("Positive Decimal Plus Positive Decimal",
197 run.test("Decimals with Leading Zeros",
200 run.test("Addition and Subtraction Chain",
203 run.test("Multiplication and Division Chain",
206 run.test("Addition After Equals",
209 run.test("Missing First Operand in Addition", '+ 9701389 = [9701389]');
211 run.test("Missing First Operand in Subtraction", '- 1770 = [-1770]');
213 run.test("Missing First Operand in Multiplication", '* 65146 = [0]');
215 run.test("Missing First Operand in Division", '/ 8 = [0]');
217 run.test("Missing Second Operand in Addition",
222 run.test("Missing Second Operand in Subtraction",
227 run.test("Missing Second Operand in Multiplication",
232 run.test("Missing Second Operand in Division",
237 run.test("Missing Last Operand in Addition and Subtraction Chain",
242 run.test("Leading zeros should be collapsed",
248 run.test("Test utilities should correctly predict zeros collapse",
255 run.log();
257 return run;