• Home
  • History
  • Annotate
  • only in /packages/apps/ExactCalculator/tests/
NameDateSize

..21-Dec-20174 KiB

Android.mk21-Dec-2017277

AndroidManifest.xml21-Dec-20171.1 KiB

README.txt21-Dec-20171.8 KiB

src/21-Dec-20174 KiB

README.txt

1Run on Android with
2
31) Build the tests.
42) Install the calculator with
5adb install <tree root>/out/target/product/generic/data/app/ExactCalculator/ExactCalculator.apk
63) adb install <tree root>/out/target/product/generic/data/app/ExactCalculatorTests/ExactCalculatorTests.apk
74) adb shell am instrument -w com.android.calculator2.tests/android.test.InstrumentationTestRunner
8
9There are three 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.
13This is currently only a placeholder for regression tests we shouldn't
14forget; it doesn't yet actually do much of anything.
15
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.)
22
233. A quick test of Evaluator.testUnflipZeroes(), which we do not know how to
24test manually.
25
26We currently have no automatic tests for display formatting corner cases.
27The following numbers have exhibited problems in the past and would be good
28to test.  Some of them are difficult to test automatically, because they
29require scrolling to both ends of the result.  For those with finite
30decimal expansions, it also worth confirming that the "display with leading
31digits" display shows an exact value when scrolled all the way to the right.
32
33Some interesting manual test cases:
34
3510^10 + 10^30
3610^30 + 10^-10
37-10^30 + 20
3810^30 + 10^-30
39-10^30 - 10^10
40-1.2x10^-9
41-1.2x10^-8
42-1.2x10^-10
43-10^-12
441 - 10^-98
451 - 10^-100
461 - 10^-300
471/-56x10^18 (on a Nexus 7 sized portrait display)
48-10^-500 (scroll to see the 1, then scroll back & verify minus sign appears)
49