blob: ee64f0c7bb8d86f902b631b17c867ca1f2408217 [file] [log] [blame]
Hans Boehm75ca21c2015-03-11 18:43:24 -07001Run on Android with
2
31) Build the tests.
42) Install the calculator with
Hans Boehm4db31b42015-05-31 12:19:05 -07005adb install <tree root>/out/target/product/generic/data/app/ExactCalculator/ExactCalculator.apk
Hans Boehm75ca21c2015-03-11 18:43:24 -070063) adb install <tree root>/out/target/product/generic/data/app/ExactCalculatorTests/ExactCalculatorTests.apk
74) adb shell am instrument -w com.android.exactcalculator.tests/android.test.InstrumentationTestRunner
8
9There are two kinds of tests:
10
111. A superficial test of calculator functionality through the UI.
12This is a resurrected version of a test that appeared in KitKat.
Hans Boehm4a6b7cb2015-04-03 18:41:52 -070013This is currently only a placeholder for regression tests we shouldn't
14forget; it doesn't yet actually do much of anything.
Hans Boehm75ca21c2015-03-11 18:43:24 -070015
162. A test of the BoundedRationals library that mostly checks for agreement
17with the constructive reals (CR) package. (The BoundedRationals package
18is used by the calculator mostly to identify exact results, i.e.
19terminating decimal expansions. But it's also used to optimize CR
20computations, and bugs in BoundedRational could result in incorrect
21outputs.)
Hans Boehm5e802f32015-06-22 17:18:52 -070022
23We currently have no automatic tests for display formatting corner cases.
24The following numbers have exhibited problems in the past and would be good
25to test. Some of them are difficult to test automatically, because they
26require scrolling to both ends of the result. For those with finite
27decimal expansions, it also worth confirming that the "display with leading
28digits" display shows an exact value when scrolled all the way to the right.
29
30Some interesting test cases:
31
3210^10 + 10^30
3310^30 + 10^-10
34-10^30 + 20
3510^30 + 10^-30
36-10^30 - 10^10
37-1.2x10^-9
38-1.2x10^-8
391 - 10^-98
401 - 10^-100
411 - 10^-300
421/-56x10^18 (on a Nexus 7 sized portrait display)
43-10^-500 (scroll to see the 1, then scroll back & verify minus sign appears)