@@ -153,7 +153,7 @@ object Test {
153
153
val blasExprIntExpr = new Blas1 (new RingIntExpr , new ExprVecOps )
154
154
val resCode2 : Expr [(Array [Int ], Array [Int ]) => Int ] = ' {
155
155
(arr1, arr2) =>
156
- assert (arr1.length == arr2.length)
156
+ if (arr1.length != arr2.length) throw new Exception ( " ... " )
157
157
~ {
158
158
blasExprIntExpr.dot(
159
159
new Vec ('(arr1.size), i => ' (arr1(~ i))),
@@ -177,7 +177,7 @@ object Test {
177
177
val blasExprIntPVExpr = new Blas1 (new RingPV [Int ](new RingInt , new RingIntExpr ), new StaticVecOps )
178
178
val resCode4 : Expr [Array [Int ] => Int ] = ' {
179
179
arr =>
180
- assert (arr.length == ~ vec2.size.toExpr)
180
+ if (arr.length != ~ vec2.size.toExpr) throw new Exception ( " ... " )
181
181
~ {
182
182
blasExprIntPVExpr.dot(
183
183
new Vec (vec2.size, i => Dyn ('(arr(~i.toExpr)))),
@@ -194,7 +194,7 @@ object Test {
194
194
val blasExprComplexPVInt = new Blas1 [Int , Complex [PV [Int ]]](new RingComplex (new RingPV [Int ](new RingInt , new RingIntExpr )), new StaticVecOps )
195
195
val resCode5 : Expr [Array [Complex [Int ]] => Complex [Int ]] = ' {
196
196
arr =>
197
- assert (arr.length == ~ cmpxVec2.size.toExpr)
197
+ if (arr.length != ~ cmpxVec2.size.toExpr) throw new Exception ( " ... " )
198
198
~ {
199
199
val cpx = blasExprComplexPVInt.dot(
200
200
new Vec (cmpxVec2.size, i => Complex (Dyn ('(arr(~i.toExpr).re)), Dyn( ' (arr(~ i.toExpr).im)))),
0 commit comments