@@ -31,6 +31,7 @@ public void Cleanup()
31
31
public void CompileLess ( )
32
32
{
33
33
var result = _processor . Process ( "../../artifacts/lessconfig.json" ) ;
34
+ Assert . IsTrue ( result . All ( r => ! r . HasErrors ) ) ;
34
35
Assert . IsTrue ( File . Exists ( "../../artifacts/less/test.css" ) ) ;
35
36
Assert . IsTrue ( File . Exists ( "../../artifacts/less/test.min.css" ) ) ;
36
37
Assert . IsTrue ( result . ElementAt ( 1 ) . CompiledContent . Contains ( "url(foo.png)" ) ) ;
@@ -51,6 +52,7 @@ public void CompileLess()
51
52
public void CompileLessWithError ( )
52
53
{
53
54
var result = _processor . Process ( "../../artifacts/lessconfigerror.json" ) ;
55
+ Assert . IsTrue ( result . Any ( r => r . HasErrors ) ) ;
54
56
Assert . IsTrue ( result . Count ( ) == 1 ) ;
55
57
Assert . IsTrue ( result . ElementAt ( 0 ) . HasErrors ) ;
56
58
}
@@ -59,6 +61,7 @@ public void CompileLessWithError()
59
61
public void CompileLessWithParsingExceptionError ( )
60
62
{
61
63
var result = _processor . Process ( "../../artifacts/lessconfigParseerror.json" ) ;
64
+ Assert . IsTrue ( result . Any ( r => r . HasErrors ) ) ;
62
65
Assert . IsTrue ( result . Count ( ) == 1 ) ;
63
66
Assert . IsTrue ( result . ElementAt ( 0 ) . HasErrors ) ;
64
67
Assert . AreNotEqual ( 0 , result . ElementAt ( 0 ) . Errors . ElementAt ( 0 ) . LineNumber , "LineNumber is set when engine.TransformToCss generate a ParsingException" ) ;
@@ -76,14 +79,23 @@ public void CompileLessWithOptions()
76
79
public void AssociateExtensionSourceFileChangedTest ( )
77
80
{
78
81
var result = _processor . SourceFileChanged ( "../../artifacts/lessconfig.json" , "less/test.less" , null ) ;
82
+ Assert . IsTrue ( result . All ( r => ! r . HasErrors ) ) ;
79
83
Assert . AreEqual ( 2 , result . Count < CompilerResult > ( ) ) ;
80
84
}
81
85
82
86
[ TestMethod , TestCategory ( "LESS" ) ]
83
87
public void OtherExtensionTypeSourceFileChangedTest ( )
84
88
{
85
89
var result = _processor . SourceFileChanged ( "../../artifacts/lessconfig.json" , "scss/test.scss" , null ) ;
90
+ Assert . IsTrue ( result . All ( r => ! r . HasErrors ) ) ;
86
91
Assert . AreEqual ( 0 , result . Count < CompilerResult > ( ) ) ;
87
92
}
93
+
94
+ [ TestMethod , TestCategory ( "LESS" ) ]
95
+ public void CompileLessLegacyStrictMath ( )
96
+ {
97
+ var result = _processor . Process ( "../../artifacts/lessconfigLegacyStrictMath.json" ) ;
98
+ Assert . IsTrue ( result . All ( r => ! r . HasErrors || r . Errors . All ( e => e . IsWarning ) ) ) ;
99
+ }
88
100
}
89
101
}
0 commit comments