diff options
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/org/anarres/cpp/LexerSourceTest.java | 1 | ||||
-rw-r--r-- | src/test/java/org/anarres/cpp/NumericValueTest.java | 12 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/test/java/org/anarres/cpp/LexerSourceTest.java b/src/test/java/org/anarres/cpp/LexerSourceTest.java index f51b253..80abdd3 100644 --- a/src/test/java/org/anarres/cpp/LexerSourceTest.java +++ b/src/test/java/org/anarres/cpp/LexerSourceTest.java @@ -98,5 +98,6 @@ public class LexerSourceTest { testLexerSource("1e6", true, NUMBER); testLexerSource("1.45e6", true, NUMBER); testLexerSource(".45e6", true, NUMBER); + testLexerSource("-6", true, '-', NUMBER); } } diff --git a/src/test/java/org/anarres/cpp/NumericValueTest.java b/src/test/java/org/anarres/cpp/NumericValueTest.java index 9d6cbe4..5668452 100644 --- a/src/test/java/org/anarres/cpp/NumericValueTest.java +++ b/src/test/java/org/anarres/cpp/NumericValueTest.java @@ -54,16 +54,16 @@ public class NumericValueTest { testNumericValue("0x12L", 0x12); // Negative - testNumericValue("-0", 0); - testNumericValue("-1", -1); + // testNumericValue("-0", 0); + // testNumericValue("-1", -1); // Negative hex - testNumericValue("-0x56", -0x56); - testNumericValue("-0x102", -0x102); + // testNumericValue("-0x56", -0x56); + // testNumericValue("-0x102", -0x102); // Octal and negative octal testNumericValue("0673", Integer.parseInt("673", 8)); - testNumericValue("-0673", Integer.parseInt("-673", 8)); + // testNumericValue("-0673", Integer.parseInt("-673", 8)); // Floating point testNumericValue(".0", 0); @@ -75,7 +75,7 @@ public class NumericValueTest { // Sign on exponents testNumericValue("1e1", 1e1); - testNumericValue("-1e1", -1e1); + // testNumericValue("-1e1", -1e1); testNumericValue("1e-1", 1e-1); // Hex numbers with decimal exponents |