|
107 | 107 | (u/capture)) "captured traces should match."))) |
108 | 108 |
|
109 | 109 | (deftest reified-let-test |
110 | | - (let [r (b/reified-let)] |
| 110 | + (let [r (b/reified-let) |
| 111 | + [a [b1 b2 b3 b4 b5] & rs] (u/capture)] |
111 | 112 | (is (= 30 r) "function return should be right.") |
112 | | - (is (= [[:fn-call "clojure.test-clojure.storm-test-code.bodies" "reified-let" [] 1131527981] |
113 | | - [:fn-call "clojure.test-clojure.storm-test-code.bodies" "doit" [] 1131527981] |
114 | | - [:bind "a" 10 "3,1,2,2"] |
115 | | - [:bind "b" 20 "3,1,2,2"] |
116 | | - [:expr-exec 10 "3,1,2,2,2,1"] |
117 | | - [:expr-exec 20 "3,1,2,2,2,2"] |
118 | | - [:expr-exec 30 "3,1,2,2,2"] |
119 | | - [:expr-exec 30 "3,1,2,2"] |
120 | | - [:fn-return 30 "3,1,2,0"] |
121 | | - [:expr-exec 30 "3"] |
122 | | - [:fn-return 30 ""]] |
123 | | - (u/capture)) "captured traces should match."))) |
| 113 | + |
| 114 | + (is (= a [:fn-call "clojure.test-clojure.storm-test-code.bodies" "reified-let" [] 1131527981])) |
| 115 | + |
| 116 | + (is (= b1 :fn-call)) |
| 117 | + (is (= b2 "clojure.test-clojure.storm-test-code.bodies")) |
| 118 | + (is (re-find #"reify--[0-9]+\.doit" b3)) |
| 119 | + (is (= b4 [])) |
| 120 | + (is (= b5 1131527981)) |
| 121 | + |
| 122 | + (is (= (into [] rs) |
| 123 | + [[:bind "a" 10 "3,1,2,2"] |
| 124 | + [:bind "b" 20 "3,1,2,2"] |
| 125 | + [:expr-exec 10 "3,1,2,2,2,1"] |
| 126 | + [:expr-exec 20 "3,1,2,2,2,2"] |
| 127 | + [:expr-exec 30 "3,1,2,2,2"] |
| 128 | + [:expr-exec 30 "3,1,2,2"] |
| 129 | + [:fn-return 30 "3,1,2,0"] |
| 130 | + [:expr-exec 30 "3"] |
| 131 | + [:fn-return 30 ""]]) "captured traces should match."))) |
124 | 132 |
|
125 | 133 | (deftest case-test |
126 | 134 | (let [r (b/casey :first)] |
|
0 commit comments