diff options
author | Felype Santiago Ferreira <felype@vaadin.com> | 2013-12-04 16:06:43 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-12-10 14:13:52 +0000 |
commit | b5a080cced33ad088ccd269da64ae495000baaa9 (patch) | |
tree | 898aab4667b4a61031ba4ed03d0175f34298be5d /theme-compiler/tests | |
parent | 9026cef9719e8607c289bb91515bb23b5b0b9fe5 (diff) | |
download | vaadin-framework-b5a080cced33ad088ccd269da64ae495000baaa9.tar.gz vaadin-framework-b5a080cced33ad088ccd269da64ae495000baaa9.zip |
Provides error location for ArithmeticException. (#11877)
Change-Id: Ieb63ad556c3dc01196f0b9898aed9670923c9138
Diffstat (limited to 'theme-compiler/tests')
-rw-r--r-- | theme-compiler/tests/src/com/vaadin/sass/internal/expression/ArithmeticExpressionEvaluatorTest.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/theme-compiler/tests/src/com/vaadin/sass/internal/expression/ArithmeticExpressionEvaluatorTest.java b/theme-compiler/tests/src/com/vaadin/sass/internal/expression/ArithmeticExpressionEvaluatorTest.java index 8978eb812e..c408255d0e 100644 --- a/theme-compiler/tests/src/com/vaadin/sass/internal/expression/ArithmeticExpressionEvaluatorTest.java +++ b/theme-compiler/tests/src/com/vaadin/sass/internal/expression/ArithmeticExpressionEvaluatorTest.java @@ -19,6 +19,7 @@ import org.junit.Assert; import org.junit.Test; import org.w3c.css.sac.LexicalUnit; +import com.vaadin.sass.internal.expression.exception.ArithmeticException; import com.vaadin.sass.internal.expression.exception.IncompatibleUnitsException; import com.vaadin.sass.internal.parser.LexicalUnitImpl; @@ -122,4 +123,15 @@ public class ArithmeticExpressionEvaluatorTest { Assert.assertEquals(LexicalUnit.SAC_CENTIMETER, result.getLexicalUnitType()); } + + @Test(expected = ArithmeticException.class) + public void testNonExistingSignal() { + LexicalUnitImpl operand2Integer = LexicalUnitImpl.createInteger(2, 3, + null, 2); + LexicalUnitImpl operatorComma = LexicalUnitImpl.createComma(2, 3, + operand2Integer); + LexicalUnitImpl operand3Integer = LexicalUnitImpl.createInteger(2, 3, + operatorComma, 3); + LexicalUnitImpl result = evaluator.evaluate(operand2Integer); + } } |