Closed mhypolit closed 2 years ago
Use your best judgment as far as the format is concerned, as long as it makes sense to the end user. Your calculator should at the minimum handle the following examples.
Test 1:
enter 5 == 5 enter 8 == 8 enter + == 13
Test 2:
enter 5 5 5 8 + + - == -13.0 enter 13 + == 0.0
Test 3:
enter -3 == -3.0 enter -2 == -2.0 enter * == 6.0
Test 4:
enter 5 == 5.0 enter + == 11.0 enter 5 == 5 enter 9 == 9 enter 1 == 1 enter - == 8 enter / == 0.625
Unit Testing for application
Possible use jester or Karma-Jasmine.