Преглед изворни кода

Compiler-Tests: fix TestCase>>assert:equals: usage

Manfred Kroehnert пре 11 година
родитељ
комит
3cbf3fc359
3 измењених фајлова са 9 додато и 9 уклоњено
  1. 2 2
      js/Compiler-Tests.deploy.js
  2. 5 5
      js/Compiler-Tests.js
  3. 2 2
      st/Compiler-Tests.st

+ 2 - 2
js/Compiler-Tests.deploy.js

@@ -872,8 +872,8 @@ var src,ast;
 return smalltalk.withContext(function($ctx1) { 
src="foo | a | a + 1. [ [ | b | b := a ] ]";
 ast=_st(smalltalk)._parse_(src);
 _st(self["@analyzer"])._visit_(ast);
-_st(self)._assert_(_st(_st(_st(ast)._scope())._scopeLevel()).__eq((1)));
-_st(self)._assert_(_st(_st(_st(_st(_st(_st(_st(_st(_st(_st(_st(ast)._nodes())._first())._nodes())._last())._nodes())._first())._nodes())._first())._scope())._scopeLevel()).__eq((3)));
+_st(self)._assert_equals_(_st(_st(ast)._scope())._scopeLevel(),(1));
+_st(self)._assert_equals_(_st(_st(_st(_st(_st(_st(_st(_st(_st(_st(ast)._nodes())._first())._nodes())._last())._nodes())._first())._nodes())._first())._scope())._scopeLevel(),(3));
 return self}, function($ctx1) {$ctx1.fill(self,"testScopeLevel",{src:src,ast:ast}, smalltalk.SemanticAnalyzerTest)})}
 }),
 smalltalk.SemanticAnalyzerTest);

+ 5 - 5
js/Compiler-Tests.js

@@ -427,7 +427,7 @@ _st(_st(self)._interpreter())._step();
 _st(self)._assert_equals_(_st(_st(self)._interpreter())._result(),(1));
 return self}, function($ctx1) {$ctx1.fill(self,"testSimpleStepping",{}, smalltalk.ASTSteppingInterpreterTest)})},
 args: [],
-source: "testSimpleStepping\x0a\x09self interpret: 'foo 1'.\x0a    \x0a    \x22SequenceNode\x22\x0a    self interpreter step.\x0a    \x0a    self assert: self interpreter result isNil.\x0a    \x0a    \x22ValueNode\x22\x0a    self interpreter step.\x0a    \x0a    self assert: self interpreter result equals: 1\x0a    \x0a\x09",
+source: "testSimpleStepping\x0a\x09self interpret: 'foo 1'.\x0a    \x0a    \x22SequenceNode\x22\x0a    self interpreter step.\x0a    \x0a    self assert: self interpreter result isNil.\x0a    \x0a    \x22ValueNode\x22\x0a    self interpreter step.\x0a    \x0a    self assert: self interpreter result equals: 1",
 messageSends: ["interpret:", "step", "interpreter", "assert:", "isNil", "result", "assert:equals:"],
 referencedClasses: []
 }),
@@ -1173,12 +1173,12 @@ var src,ast;
 return smalltalk.withContext(function($ctx1) { 
src="foo | a | a + 1. [ [ | b | b := a ] ]";
 ast=_st(smalltalk)._parse_(src);
 _st(self["@analyzer"])._visit_(ast);
-_st(self)._assert_(_st(_st(_st(ast)._scope())._scopeLevel()).__eq((1)));
-_st(self)._assert_(_st(_st(_st(_st(_st(_st(_st(_st(_st(_st(_st(ast)._nodes())._first())._nodes())._last())._nodes())._first())._nodes())._first())._scope())._scopeLevel()).__eq((3)));
+_st(self)._assert_equals_(_st(_st(ast)._scope())._scopeLevel(),(1));
+_st(self)._assert_equals_(_st(_st(_st(_st(_st(_st(_st(_st(_st(_st(ast)._nodes())._first())._nodes())._last())._nodes())._first())._nodes())._first())._scope())._scopeLevel(),(3));
 return self}, function($ctx1) {$ctx1.fill(self,"testScopeLevel",{src:src,ast:ast}, smalltalk.SemanticAnalyzerTest)})},
 args: [],
-source: "testScopeLevel\x0a\x09| src ast |\x0a\x0a\x09src := 'foo | a | a + 1. [ [ | b | b := a ] ]'.\x0a\x09ast := smalltalk parse: src.\x0a\x09analyzer visit: ast.\x0a\x0a\x09self assert: ast scope scopeLevel = 1.\x0a\x09self assert: ast nodes first nodes last nodes first nodes first scope scopeLevel = 3",
-messageSends: ["parse:", "visit:", "assert:", "=", "scopeLevel", "scope", "first", "nodes", "last"],
+source: "testScopeLevel\x0a\x09| src ast |\x0a\x0a\x09src := 'foo | a | a + 1. [ [ | b | b := a ] ]'.\x0a\x09ast := smalltalk parse: src.\x0a\x09analyzer visit: ast.\x0a\x0a\x09self assert: ast scope scopeLevel equals: 1.\x0a\x09self assert: ast nodes first nodes last nodes first nodes first scope scopeLevel equals: 3",
+messageSends: ["parse:", "visit:", "assert:equals:", "scopeLevel", "scope", "first", "nodes", "last"],
 referencedClasses: []
 }),
 smalltalk.SemanticAnalyzerTest);

+ 2 - 2
st/Compiler-Tests.st

@@ -547,8 +547,8 @@ testScopeLevel
 	ast := smalltalk parse: src.
 	analyzer visit: ast.
 
-	self assert: ast scope scopeLevel = 1.
-	self assert: ast nodes first nodes last nodes first nodes first scope scopeLevel = 3
+	self assert: ast scope scopeLevel equals: 1.
+	self assert: ast nodes first nodes last nodes first nodes first scope scopeLevel equals: 3
 !
 
 testUnknownVariables