Changeset 2265


Ignore:
Timestamp:
Jan 22, 2007, 1:16:45 AM (14 years ago)
Author:
roman
Message:

Format Checker

Location:
devel-tools/trunk/eclipse/org.refal.plus.comp.test/src/org/refal/plus/comp/test
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • devel-tools/trunk/eclipse/org.refal.plus.comp.test/src/org/refal/plus/comp/test/NameCheckerTest.java

    r2260 r2265  
    5252        private static void expectOK(String input) {
    5353                MsgAccumulator msgAcc = parseAndReturnMessages(input);
    54                 assertTrue(msgAcc.messages.size() == 0);
     54                assertTrue(msgAcc.messages.isEmpty());
    5555        }
    5656
     
    6464                expectOK("$vector A; $const B = &A &A;");
    6565        }
    66        
     66
    6767        @Test
    6868        public void errors() {
    6969                expectMessage("$box F; F {};", MsgCode.X_IsNotAFunction, "F");
    70                 expectMessage("$box F; $func F =;", MsgCode.DuplicateDeclarationOfTheName_X, "F");
    71                 expectMessage("$box F; $string F;", MsgCode.DuplicateDeclarationOfTheName_X, "F");
    72                 expectMessage("$box F; $const F =;", MsgCode.DuplicateDeclarationOfTheName_X, "F");
     70                expectMessage("$box F; $func F =;",
     71                                MsgCode.DuplicateDeclarationOfTheName_X, "F");
     72                expectMessage("$box F; $string F;",
     73                                MsgCode.DuplicateDeclarationOfTheName_X, "F");
     74                expectMessage("$box F; $const F =;",
     75                                MsgCode.DuplicateDeclarationOfTheName_X, "F");
    7376                expectMessage("F {};", MsgCode.Function_X_IsNotDeclared, "F");
    74                 expectMessage("$func F =; $func F =;", MsgCode.DuplicateDeclarationOfTheName_X, "F");
    75                 expectMessage("$func F =; F {}; F {};", MsgCode.DuplicateDefinitionOfTheFunction_X, "F");
     77                expectMessage("$func F =; $func F =;",
     78                                MsgCode.DuplicateDeclarationOfTheName_X, "F");
     79                expectMessage("$func F =; F {}; F {};",
     80                                MsgCode.DuplicateDefinitionOfTheFunction_X, "F");
    7681                expectMessage("$const X = &F;", MsgCode.Name_X_IsNotDefined, "F");
    7782                expectMessage("$func F =; F {&X;};", MsgCode.Name_X_IsNotDefined, "X");
     
    8489                implem("$const A = X Y (Z); $const B = &A (&A);",
    8590                                "$const A = X Y (Z);$const B = X Y (Z) (X Y (Z));");
     91
     92                implem("$const A = X;$func F &A = &A;F{&A,&A;};",
     93                                "$const A = X;$func F X = X;F{X,X;};");
    8694
    8795                implem("$const A = X;$func F e = e;F{&A, &A::&A,&A;};",
  • devel-tools/trunk/eclipse/org.refal.plus.comp.test/src/org/refal/plus/comp/test/TestSuite.java

    r2260 r2265  
    1313                VariableScopeCheckerTest.class, //
    1414                FenceAndCutCheckerTest.class, //
    15                 NameCheckerTest.class //
     15                NameCheckerTest.class, //
     16                FormatCheckerTest.class //
    1617})
    1718public class TestSuite {
  • devel-tools/trunk/eclipse/org.refal.plus.comp.test/src/org/refal/plus/comp/test/VariableScopeCheckerTest.java

    r2263 r2265  
    6060        private static void expectOK(String input) {
    6161                MsgAccumulator msgAcc = parseAndReturnMessages(input);
    62                 assertTrue(msgAcc.messages.size() == 0);
     62                assertTrue(msgAcc.messages.isEmpty());
    6363        }
    6464
Note: See TracChangeset for help on using the changeset viewer.