@@ -4,7 +4,8 @@ object TestUtils {
4
4
def eval0 (s : String ,
5
5
preserveOrder : Boolean = false ,
6
6
strict : Boolean = false ,
7
- noDuplicateKeysInComprehension : Boolean = false ) = {
7
+ noDuplicateKeysInComprehension : Boolean = false ,
8
+ strictInheritedAssertions : Boolean = false ) = {
8
9
new Interpreter (
9
10
Map (),
10
11
Map (),
@@ -14,20 +15,29 @@ object TestUtils {
14
15
new Settings (
15
16
preserveOrder = preserveOrder,
16
17
strict = strict,
17
- noDuplicateKeysInComprehension = noDuplicateKeysInComprehension
18
+ noDuplicateKeysInComprehension = noDuplicateKeysInComprehension,
19
+ strictInheritedAssertions = strictInheritedAssertions
18
20
)
19
21
).interpret(s, DummyPath (" (memory)" ))
20
22
}
21
23
22
- def eval (s : String , preserveOrder : Boolean = false , strict : Boolean = false , noDuplicateKeysInComprehension : Boolean = false ) = {
23
- eval0(s, preserveOrder, strict, noDuplicateKeysInComprehension) match {
24
+ def eval (s : String ,
25
+ preserveOrder : Boolean = false ,
26
+ strict : Boolean = false ,
27
+ noDuplicateKeysInComprehension : Boolean = false ,
28
+ strictInheritedAssertions : Boolean = false ) = {
29
+ eval0(s, preserveOrder, strict, noDuplicateKeysInComprehension, strictInheritedAssertions) match {
24
30
case Right (x) => x
25
31
case Left (e) => throw new Exception (e)
26
32
}
27
33
}
28
34
29
- def evalErr (s : String , preserveOrder : Boolean = false , strict : Boolean = false , noDuplicateKeysInComprehension : Boolean = false ) = {
30
- eval0(s, preserveOrder, strict, noDuplicateKeysInComprehension) match {
35
+ def evalErr (s : String ,
36
+ preserveOrder : Boolean = false ,
37
+ strict : Boolean = false ,
38
+ noDuplicateKeysInComprehension : Boolean = false ,
39
+ strictInheritedAssertions : Boolean = false ) = {
40
+ eval0(s, preserveOrder, strict, noDuplicateKeysInComprehension, strictInheritedAssertions) match {
31
41
case Left (err) => err.split('\n ' ).map(_.trim).mkString(" \n " ) // normalize inconsistent indenation on JVM vs JS
32
42
case Right (r) => throw new Exception (s " Expected exception, got result: $r" )
33
43
}
0 commit comments