blob: 9b12862933c3f68ef49ec3ec16bec15987c69ddf (
plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
(fate_version 1)
(global string test_name)
(set! test_name ( PTR AND AT ))
(global int i)
(global int j)
(global (ptr int) i_ptr)
(global (ptr int) j_ptr)
(global (ptr (ptr int)) int_ptr_ptr)
(global (list int) li0)
(global (list int) li1)
(global (ptr (list int)) li0_ptr)
(global (ptr (list int)) li1_ptr)
(global (ptr (ptr (list int))) int_list_ptr_ptr)
(declare_structure test_struct0
(int int0)
(int int1)
((ptr int) int_ptr0)
((ptr int) int_ptr1)
((list int) int_list)
((list (ptr int)) int_ptr_list)
((ptr (list (ptr int))) int_ptr_list_ptr)
)
(global (list test_struct0) test_struct0_list)
(declare_structure test_struct1
(test_struct0 ts0)
((ptr test_struct0) ts0_ptr)
((list test_struct0) ts0_list)
((list (ptr test_struct0)) ts0_ptr_list)
((ptr (list (ptr test_struct0))) ts0_ptr_list_ptr)
)
(global (list test_struct1) test_struct1_list)
(set! i 100)
(set! j 2000)
(set! i_ptr (ptr i))
(set! j_ptr (ptr j))
(set! int_ptr_ptr (ptr i_ptr))
(assert! (= (var i) (at i_ptr) (at (at int_ptr_ptr))) [FAILED] (var test_name) equality 0.)
(set! i_ptr (ptr j))
(assert! (= (var j) (at i_ptr) (at (at int_ptr_ptr))) [FAILED] (var test_name) equality 1.)
(global int b)
(set! j_ptr (ptr b))
(set! (at j_ptr) (at (at int_ptr_ptr)))
(assert! (= (var b) (var j) (at i_ptr) (at (at int_ptr_ptr))) [FAILED] (var test_name) equality 2.)
(global (ptr int) b_ptr)
(set! i 100)
(set! j 2000)
(set! i_ptr (ptr i))
(set! j_ptr (ptr j))
(set! b_ptr (ptr b))
(set! int_ptr_ptr (ptr b_ptr))
(global test_struct0 ts0)
(struct:set_fields! ts0
(int0 3)
(int1 40)
(int_ptr0 (ptr ts0.int0))
(int_ptr1 (ptr ts0.int1))
(int_list (list:range 0 10 1))
(int_ptr_list_ptr (ptr ts0.int_ptr_list))
)
(add! (ptr i) ts0.int_ptr_list)
(add! (ptr j) ts0.int_ptr_list)
(add! (at int_ptr_ptr) ts0.int_ptr_list)
(add! (var ts0.int_ptr0) ts0.int_ptr_list)
(add! (var ts0.int_ptr1) ts0.int_ptr_list)
(assert! (= (var ts0.int_ptr_list.0) (var i_ptr) (ptr i)) [FAILED] (var test_name) equality 3.)
(assert! (= (var ts0.int_ptr_list.1) (var j_ptr) (ptr j)) [FAILED] (var test_name) equality 4.)
(assert! (= (var ts0.int_ptr_list.2) (var b_ptr) (ptr b)) [FAILED] (var test_name) equality 5.)
(assert! (= (at ts0.int_ptr_list.3) (at ts0.int_ptr0) (at (ptr ts0.int0)) (var ts0.int0)) [FAILED] (var test_name) equality 6.)
(assert! (= (at ts0.int_ptr_list.4) (at ts0.int_ptr1) (at (ptr ts0.int1)) (var ts0.int1)) [FAILED] (var test_name) equality 7.)
[COMPLETED] (var test_name)
(end!)
|