forked from runtimeverification/javamop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathunit-test-design.txt
33 lines (23 loc) · 979 Bytes
/
unit-test-design.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
***Should not add new function code to the code base: that'll add more
uncovered code and increase the burden of testing.
***add helper code in the test folder if necessary.
For each eg used in unit-testing we should have:
1. mop spec file
2. trusted ast for the mop spec file
3. trusted .aj output string and .rvm output string
==
Implement function to test:
1) whether the untrusted implementation of parse function
can derive the same ast as the trusted one from a mop spec.
core: compare whether two ast are the same.
two steps~
i) check shape (same structure)
*too time consuming if we fully explored the ast.
*may perform a bounded depths checking
*increment the depth of exploration in the future
ii) compare the equality of dumped strings
2) whether the same output will be generated from the same ast
for the system under test:
input: the trusted ast
read the ast, then generate actual .aj and .rvm
compare with the expected ones: equality of strings.