Changeset 2280


Ignore:
Timestamp:
Jan 23, 2007, 12:00:01 AM (14 years ago)
Author:
roman
Message:

All context checks seem to have been implemented, after all.

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

Legend:

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

    r2263 r2280  
    3030                AstImplem astImplem = Util.parseImplemString(input, msgAcc);
    3131                assertTrue("Syntax is OK", msgAcc.messages.isEmpty());
    32                 FenceAndCutChecker v = new FenceAndCutChecker(msgAcc);
    33                 v.visit(astImplem, 0);
     32                FenceAndCutChecker.check(astImplem, msgAcc);
    3433                return msgAcc;
    3534        }
  • devel-tools/trunk/eclipse/org.refal.plus.comp.test/src/org/refal/plus/comp/test/FormatCheckerTest.java

    r2265 r2280  
    2525                AstImplem astImplem = Util.parseImplemString(input, msgAcc);
    2626                assertTrue("Syntax is OK", msgAcc.messages.isEmpty());
    27                 NameChecker v = new NameChecker(msgAcc);
    28                 v.visit(astImplem);
     27                NameChecker.check(astImplem, msgAcc);
    2928                assertTrue("Names are OK", msgAcc.messages.isEmpty());
    30                 FormatChecker f = new FormatChecker(msgAcc);
    31                 f.visit(astImplem, null);
     29                FormatChecker.check(astImplem, msgAcc);
    3230                return msgAcc;
    3331        }
  • devel-tools/trunk/eclipse/org.refal.plus.comp.test/src/org/refal/plus/comp/test/MsgAccumulator.java

    r2243 r2280  
    2929        @Override
    3030        public void send(SrcPosition pos, MsgCode msgCode, Object... args) {
     31                updateCounters(msgCode);
    3132                messages.add(new Message(pos, msgCode, args));
    3233        }
  • devel-tools/trunk/eclipse/org.refal.plus.comp.test/src/org/refal/plus/comp/test/NameCheckerTest.java

    r2265 r2280  
    2626                AstImplem astImplem = Util.parseImplemString(input, msgAcc);
    2727                assertTrue("Syntax is OK", msgAcc.messages.isEmpty());
    28                 NameChecker v = new NameChecker(msgAcc);
    29                 v.visit(astImplem);
     28                NameChecker.check(astImplem, msgAcc);
    3029                assertTrue("Names are OK", msgAcc.messages.isEmpty());
    3130                ImageBuilder imageBuilder = new ImageBuilder();
     
    3938                AstImplem astImplem = Util.parseImplemString(input, msgAcc);
    4039                assertTrue("Syntax is OK", msgAcc.messages.isEmpty());
    41                 NameChecker v = new NameChecker(msgAcc);
    42                 v.visit(astImplem);
     40                NameChecker.check(astImplem, msgAcc);
    4341                return msgAcc;
    4442        }
  • devel-tools/trunk/eclipse/org.refal.plus.comp.test/src/org/refal/plus/comp/test/VariableScopeCheckerTest.java

    r2265 r2280  
    4242                AstImplem astImplem = Util.parseImplemString(input, msgAcc);
    4343                assertTrue("Syntax is OK", msgAcc.messages.isEmpty());
    44                 VariableScopeChecker v = new VariableScopeChecker(msgAcc);
    45                 v.visit(astImplem, null);
     44                VariableScopeChecker.check(msgAcc, astImplem);
    4645                return msgAcc;
    4746        }
     
    6766                for (AstTerm term : astTerms)
    6867                        termList.add(term);
    69                 return new AstExp(termList);
     68                return new AstExp(null, termList);
    7069        }
    7170
     
    106105        @Test
    107106        public void variableCollector() {
    108                 AstCall f_Call_sX = new AstCall(n("F"), exp(s("X")));
    109                 AstParen paren = new AstParen(exp(s("Y"), e("X")));
    110                 AstRef ref = new AstRef(n("R"));
     107                AstCall f_Call_sX = new AstCall(null, n("F"), exp(s("X")));
     108                AstParen paren = new AstParen(null, exp(s("Y"), e("X")));
     109                AstRef ref = new AstRef(null, n("R"));
    111110                AstCharSymbol charSymbol = new AstCharSymbol(null, 'A');
    112111                AstNumberSymbol numberSymbol = new AstNumberSymbol(null,
Note: See TracChangeset for help on using the changeset viewer.