Changeset 14733 for branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests
- Timestamp:
- 03/08/17 11:57:42 (7 years ago)
- Location:
- branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Benchmark/ProblemTests.cs
r14727 r14733 141 141 142 142 Expression bestProgram = null; 143 var config = new Push GpConfiguration { EvalPushLimit = 4096 };144 var pool = new Push GpInterpreterPool(config);143 var config = new PushConfiguration { EvalPushLimit = 4096 }; 144 var pool = new PushInterpreterPool(config); 145 145 146 146 var instance = new BenchmarkSuiteInstanceProvider(); -
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/ExpressionTest.cs
r14727 r14733 8 8 protected PushGpInterpreter interpreter; 9 9 10 protected Push GpConfiguration configuration = new PushGpConfiguration { TopLevelPushCode = false };10 protected PushConfiguration configuration = new PushConfiguration { TopLevelPushCode = false }; 11 11 12 12 [TestInitialize] -
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/CodeExpressionTests.cs
r14727 r14733 29 29 [TestCategory("CodeExpressionTest")] 30 30 public void TestAppendLists() { 31 var first = Push GPParser.Parse("( A )");32 var second = Push GPParser.Parse("( B )");33 var result = Push GPParser.Parse("( A B )");31 var first = PushParser.Parse("( A )"); 32 var second = PushParser.Parse("( B )"); 33 var result = PushParser.Parse("( A B )"); 34 34 35 35 this.interpreter.CodeStack.Push(second, first); … … 45 45 [TestCategory("CodeExpressionTest")] 46 46 public void TestAppendListAndLiteral() { 47 var first = Push GPParser.Parse("( A )");48 var second = Push GPParser.Parse("5");49 var result = Push GPParser.Parse("( A 5 )");47 var first = PushParser.Parse("( A )"); 48 var second = PushParser.Parse("5"); 49 var result = PushParser.Parse("( A 5 )"); 50 50 51 51 this.interpreter.CodeStack.Push(second, first); … … 61 61 [TestCategory("CodeExpressionTest")] 62 62 public void TestAppendLiterals() { 63 var first = Push GPParser.Parse("4");64 var second = Push GPParser.Parse("5");65 var result = Push GPParser.Parse("( 4 5 )");63 var first = PushParser.Parse("4"); 64 var second = PushParser.Parse("5"); 65 var result = PushParser.Parse("( 4 5 )"); 66 66 67 67 this.interpreter.CodeStack.Push(second, first); … … 77 77 [TestCategory("CodeExpressionTest")] 78 78 public void TestDuplicateList() { 79 var list = Push GPParser.Parse("( A B C )");80 var result = Push GPParser.Parse("( A B C )");79 var list = PushParser.Parse("( A B C )"); 80 var result = PushParser.Parse("( A B C )"); 81 81 82 82 this.interpreter.CodeStack.Push(list); … … 95 95 [TestCategory("CodeExpressionTest")] 96 96 public void TestAtomList() { 97 var first = Push GPParser.Parse("( A )");97 var first = PushParser.Parse("( A )"); 98 98 99 99 this.interpreter.CodeStack.Push(first); … … 109 109 [TestCategory("CodeExpressionTest")] 110 110 public void TestAtomLiteral() { 111 var first = Push GPParser.Parse("5");111 var first = PushParser.Parse("5"); 112 112 113 113 this.interpreter.CodeStack.Push(first); … … 123 123 [TestCategory("CodeExpressionTest")] 124 124 public void TestAtomSingleInstruction() { 125 var first = Push GPParser.Parse("INTEGER.+");125 var first = PushParser.Parse("INTEGER.+"); 126 126 127 127 this.interpreter.CodeStack.Push(first); … … 137 137 [TestCategory("CodeExpressionTest")] 138 138 public void TestCarList() { 139 var first = Push GPParser.Parse("( A B C )");140 var result = Push GPParser.Parse("A");139 var first = PushParser.Parse("( A B C )"); 140 var result = PushParser.Parse("A"); 141 141 142 142 this.interpreter.CodeStack.Push(first); … … 152 152 [TestCategory("CodeExpressionTest")] 153 153 public void TestCarNoList() { 154 var first = Push GPParser.Parse("5");155 var result = Push GPParser.Parse("5");154 var first = PushParser.Parse("5"); 155 var result = PushParser.Parse("5"); 156 156 157 157 this.interpreter.CodeStack.Push(first); … … 167 167 [TestCategory("CodeExpressionTest")] 168 168 public void TestCdrList() { 169 var first = Push GPParser.Parse("( A B C )");170 var result = Push GPParser.Parse("( B C )");169 var first = PushParser.Parse("( A B C )"); 170 var result = PushParser.Parse("( B C )"); 171 171 172 172 this.interpreter.CodeStack.Push(first); … … 182 182 [TestCategory("CodeExpressionTest")] 183 183 public void TestCdrNoList() { 184 var first = Push GPParser.Parse("5");185 var result = Push GPParser.Parse("( )");184 var first = PushParser.Parse("5"); 185 var result = PushParser.Parse("( )"); 186 186 187 187 this.interpreter.CodeStack.Push(first); … … 197 197 [TestCategory("CodeExpressionTest")] 198 198 public void TestCons() { 199 var first = Push GPParser.Parse("( B C )");200 var second = Push GPParser.Parse("A");201 var result = Push GPParser.Parse("( A B C )");199 var first = PushParser.Parse("( B C )"); 200 var second = PushParser.Parse("A"); 201 var result = PushParser.Parse("( A B C )"); 202 202 203 203 this.interpreter.CodeStack.Push(second, first); … … 213 213 [TestCategory("CodeExpressionTest")] 214 214 public void TestContainsTrue() { 215 var first = Push GPParser.Parse("A");216 var second = Push GPParser.Parse("( A B C )");215 var first = PushParser.Parse("A"); 216 var second = PushParser.Parse("( A B C )"); 217 217 218 218 this.interpreter.CodeStack.Push(second, first); … … 228 228 [TestCategory("CodeExpressionTest")] 229 229 public void TestContainsFalse() { 230 var first = Push GPParser.Parse("D");231 var second = Push GPParser.Parse("( A B C )");230 var first = PushParser.Parse("D"); 231 var second = PushParser.Parse("( A B C )"); 232 232 233 233 this.interpreter.CodeStack.Push(second, first); … … 243 243 [TestCategory("CodeExpressionTest")] 244 244 public void TestContainer() { 245 var first = Push GPParser.Parse("( A )");246 var second = Push GPParser.Parse("( B ( C ( A ) ) ( D ( A ) ) )");247 var result = Push GPParser.Parse("( C ( A ) )");245 var first = PushParser.Parse("( A )"); 246 var second = PushParser.Parse("( B ( C ( A ) ) ( D ( A ) ) )"); 247 var result = PushParser.Parse("( C ( A ) )"); 248 248 249 249 this.interpreter.CodeStack.Push(second, first); … … 259 259 [TestCategory("CodeExpressionTest")] 260 260 public void TestDefinition() { 261 var code = Push GPParser.Parse("( A )");261 var code = PushParser.Parse("( A )"); 262 262 263 263 this.interpreter.CustomExpressions.Add("Test", code); … … 275 275 [TestCategory("CodeExpressionTest")] 276 276 public void TestDefinitionWithoutMatchingName() { 277 var code = Push GPParser.Parse("( A )");277 var code = PushParser.Parse("( A )"); 278 278 var program = new CodeDefinitionExpression(); 279 279 … … 290 290 [TestCategory("CodeExpressionTest")] 291 291 public void TestDiscrepancy() { 292 var first = Push GPParser.Parse("( A B )");293 var second = Push GPParser.Parse("( B C )");292 var first = PushParser.Parse("( A B )"); 293 var second = PushParser.Parse("( B C )"); 294 294 295 295 this.interpreter.CodeStack.Push(second, first); … … 305 305 [TestCategory("CodeExpressionTest")] 306 306 public void TestDiscrepancyAllEqual() { 307 var first = Push GPParser.Parse("( A B )");308 var second = Push GPParser.Parse("( B A )");307 var first = PushParser.Parse("( A B )"); 308 var second = PushParser.Parse("( B A )"); 309 309 310 310 this.interpreter.CodeStack.Push(second, first); … … 320 320 [TestCategory("CodeExpressionTest")] 321 321 public void TestDiscrepancyComplex() { 322 var first = Push GPParser.Parse("( A A B C D A )");323 var second = Push GPParser.Parse("( A A B D E )");322 var first = PushParser.Parse("( A A B C D A )"); 323 var second = PushParser.Parse("( A A B D E )"); 324 324 325 325 this.interpreter.CodeStack.Push(second, first); … … 335 335 [TestCategory("CodeExpressionTest")] 336 336 public void TestDiscrepancWithLists() { 337 var first = Push GPParser.Parse("( ( A ) A ( B ) C D A )");338 var second = Push GPParser.Parse("( A ( A ) B D E )");337 var first = PushParser.Parse("( ( A ) A ( B ) C D A )"); 338 var second = PushParser.Parse("( A ( A ) B D E )"); 339 339 340 340 this.interpreter.CodeStack.Push(second, first); … … 350 350 [TestCategory("CodeExpressionTest")] 351 351 public void TestDo() { 352 var prog = Push GPParser.Parse("( 10 )");352 var prog = PushParser.Parse("( 10 )"); 353 353 354 354 this.interpreter.CodeStack.Push(prog); … … 364 364 [TestCategory("CodeExpressionTest")] 365 365 public void TestDoX() { 366 var prog = Push GPParser.Parse("( 10 )");366 var prog = PushParser.Parse("( 10 )"); 367 367 368 368 this.interpreter.CodeStack.Push(prog); … … 378 378 [TestCategory("CodeExpressionTest")] 379 379 public void TestDoCount() { 380 var prog = Push GPParser.Parse("INTEGER.+");380 var prog = PushParser.Parse("INTEGER.+"); 381 381 382 382 this.interpreter.IntegerStack.Push(3); … … 393 393 [TestCategory("CodeExpressionTest")] 394 394 public void TestDoCountWithNegativeCounter() { 395 var prog = Push GPParser.Parse("INTEGER.+");395 var prog = PushParser.Parse("INTEGER.+"); 396 396 397 397 this.interpreter.IntegerStack.Push(-1); … … 408 408 [TestCategory("CodeExpressionTest")] 409 409 public void TestDoRange() { 410 var prog = Push GPParser.Parse("INTEGER.+");410 var prog = PushParser.Parse("INTEGER.+"); 411 411 412 412 this.interpreter.IntegerStack.Push(3, 5); … … 423 423 [TestCategory("CodeExpressionTest")] 424 424 public void TestDoRangeWithEqualIndecators() { 425 var prog = Push GPParser.Parse("INTEGER.+");425 var prog = PushParser.Parse("INTEGER.+"); 426 426 427 427 this.interpreter.IntegerStack.Push(3, 3); … … 438 438 [TestCategory("CodeExpressionTest")] 439 439 public void TestDoRangeWithNegativeIndecators() { 440 var prog = Push GPParser.Parse("INTEGER.+");440 var prog = PushParser.Parse("INTEGER.+"); 441 441 442 442 this.interpreter.IntegerStack.Push(-3, -5); … … 453 453 [TestCategory("CodeExpressionTest")] 454 454 public void TestDoTimes() { 455 var prog = Push GPParser.Parse("( INTEGER.DUP INTEGER.+ )");455 var prog = PushParser.Parse("( INTEGER.DUP INTEGER.+ )"); 456 456 457 457 this.interpreter.IntegerStack.Push(2, 3); … … 468 468 [TestCategory("CodeExpressionTest")] 469 469 public void TestDoTimesWithNegativeCounter() { 470 var prog = Push GPParser.Parse("( INTEGER.DUP INTEGER.+ )");470 var prog = PushParser.Parse("( INTEGER.DUP INTEGER.+ )"); 471 471 472 472 this.interpreter.IntegerStack.Push(2, -3); … … 519 519 [TestCategory("CodeExpressionTest")] 520 520 public void TestExtract() { 521 var prog = Push GPParser.Parse("( A ( B C ( D ) E ) F G H I J ( K ) L )");522 var result = Push GPParser.Parse("( D )");521 var prog = PushParser.Parse("( A ( B C ( D ) E ) F G H I J ( K ) L )"); 522 var result = PushParser.Parse("( D )"); 523 523 524 524 this.interpreter.IntegerStack.Push(5); … … 535 535 [TestCategory("CodeExpressionTest")] 536 536 public void TestExtractInteger() { 537 var prog = Push GPParser.Parse("( A ( 5 C ( 4.2 ) INTEGER.+ ) FALSE )");538 var result = Push GPParser.Parse("5");537 var prog = PushParser.Parse("( A ( 5 C ( 4.2 ) INTEGER.+ ) FALSE )"); 538 var result = PushParser.Parse("5"); 539 539 540 540 this.interpreter.IntegerStack.Push(3); … … 551 551 [TestCategory("CodeExpressionTest")] 552 552 public void TestExtractFloat() { 553 var prog = Push GPParser.Parse("( A ( 5 C ( 4.2 ) INTEGER.+ ) FALSE )");554 var result = Push GPParser.Parse("4.2");553 var prog = PushParser.Parse("( A ( 5 C ( 4.2 ) INTEGER.+ ) FALSE )"); 554 var result = PushParser.Parse("4.2"); 555 555 556 556 this.interpreter.IntegerStack.Push(6); … … 567 567 [TestCategory("CodeExpressionTest")] 568 568 public void TestExtractBoolean() { 569 var prog = Push GPParser.Parse("( A ( 5 C ( 4.2 ) INTEGER.+ ) FALSE )");570 var result = Push GPParser.Parse("FALSE");569 var prog = PushParser.Parse("( A ( 5 C ( 4.2 ) INTEGER.+ ) FALSE )"); 570 var result = PushParser.Parse("FALSE"); 571 571 572 572 this.interpreter.IntegerStack.Push(8); … … 583 583 [TestCategory("CodeExpressionTest")] 584 584 public void TestExtractInstruction() { 585 var prog = Push GPParser.Parse("( A ( 5 C ( 4.2 ) INTEGER.+ ) FALSE )");586 var result = Push GPParser.Parse("INTEGER.+");585 var prog = PushParser.Parse("( A ( 5 C ( 4.2 ) INTEGER.+ ) FALSE )"); 586 var result = PushParser.Parse("INTEGER.+"); 587 587 588 588 this.interpreter.IntegerStack.Push(7); … … 599 599 [TestCategory("CodeExpressionTest")] 600 600 public void TestFromBoolean() { 601 var result = Push GPParser.Parse("FALSE");601 var result = PushParser.Parse("FALSE"); 602 602 this.interpreter.BooleanStack.Push(false); 603 603 this.interpreter.Run(new CodeFromBooleanExpression()); … … 612 612 [TestCategory("CodeExpressionTest")] 613 613 public void TestFromFloat() { 614 var result = Push GPParser.Parse("4.1");614 var result = PushParser.Parse("4.1"); 615 615 this.interpreter.FloatStack.Push(4.1); 616 616 this.interpreter.Run(new CodeFromFloatExpression()); … … 625 625 [TestCategory("CodeExpressionTest")] 626 626 public void TestFromInteger() { 627 var result = Push GPParser.Parse("4");627 var result = PushParser.Parse("4"); 628 628 this.interpreter.IntegerStack.Push(4); 629 629 this.interpreter.Run(new CodeFromIntegerExpression()); … … 638 638 [TestCategory("CodeExpressionTest")] 639 639 public void TestFromName() { 640 var result = Push GPParser.Parse("A");640 var result = PushParser.Parse("A"); 641 641 this.interpreter.NameStack.Push("A"); 642 642 this.interpreter.Run(new CodeFromNameExpression()); … … 651 651 [TestCategory("CodeExpressionTest")] 652 652 public void TestIfTrue() { 653 var first = Push GPParser.Parse("FALSCH");654 var second = Push GPParser.Parse("WAHR");653 var first = PushParser.Parse("FALSCH"); 654 var second = PushParser.Parse("WAHR"); 655 655 656 656 this.interpreter.BooleanStack.Push(true); … … 667 667 [TestCategory("CodeExpressionTest")] 668 668 public void TestIfFalse() { 669 var first = Push GPParser.Parse("FALSCH");670 var second = Push GPParser.Parse("WAHR");669 var first = PushParser.Parse("FALSCH"); 670 var second = PushParser.Parse("WAHR"); 671 671 672 672 this.interpreter.BooleanStack.Push(false); … … 683 683 [TestCategory("CodeExpressionTest")] 684 684 public void TestInsert() { 685 var first = Push GPParser.Parse("( A ( B ) C D )");686 var second = Push GPParser.Parse("( E )");687 var result = Push GPParser.Parse("( A ( B ) ( E ) D )");685 var first = PushParser.Parse("( A ( B ) C D )"); 686 var second = PushParser.Parse("( E )"); 687 var result = PushParser.Parse("( A ( B ) ( E ) D )"); 688 688 689 689 this.interpreter.IntegerStack.Push(2); … … 700 700 [TestCategory("CodeExpressionTest")] 701 701 public void TestInsertWithNegativeN() { 702 var first = Push GPParser.Parse("( A ( B ) C D )");703 var second = Push GPParser.Parse("( E )");704 var result = Push GPParser.Parse("( A ( B ) ( E ) D )");702 var first = PushParser.Parse("( A ( B ) C D )"); 703 var second = PushParser.Parse("( E )"); 704 var result = PushParser.Parse("( A ( B ) ( E ) D )"); 705 705 706 706 this.interpreter.IntegerStack.Push(-2); … … 717 717 [TestCategory("CodeExpressionTest")] 718 718 public void TestInsertWithTooBigN() { 719 var first = Push GPParser.Parse("( A ( B ) C D )");720 var second = Push GPParser.Parse("( E )");721 var result = Push GPParser.Parse("( A ( B ) ( E ) D )");719 var first = PushParser.Parse("( A ( B ) C D )"); 720 var second = PushParser.Parse("( E )"); 721 var result = PushParser.Parse("( A ( B ) ( E ) D )"); 722 722 723 723 this.interpreter.IntegerStack.Push(10); … … 734 734 [TestCategory("CodeExpressionTest")] 735 735 public void TestList() { 736 var first = Push GPParser.Parse("A");737 var second = Push GPParser.Parse("( B )");738 var result = Push GPParser.Parse("( A ( B ) )");736 var first = PushParser.Parse("A"); 737 var second = PushParser.Parse("( B )"); 738 var result = PushParser.Parse("( A ( B ) )"); 739 739 740 740 this.interpreter.CodeStack.Push(second, first); … … 750 750 [TestCategory("CodeExpressionTest")] 751 751 public void TestMemberTrue() { 752 var first = Push GPParser.Parse("( A B ( B ) C ");753 var second = Push GPParser.Parse("( B )");752 var first = PushParser.Parse("( A B ( B ) C "); 753 var second = PushParser.Parse("( B )"); 754 754 755 755 this.interpreter.CodeStack.Push(second, first); … … 765 765 [TestCategory("CodeExpressionTest")] 766 766 public void TestMemberFalse() { 767 var first = Push GPParser.Parse("( A B C ");768 var second = Push GPParser.Parse("( B )");767 var first = PushParser.Parse("( A B C "); 768 var second = PushParser.Parse("( B )"); 769 769 770 770 this.interpreter.CodeStack.Push(second, first); … … 780 780 [TestCategory("CodeExpressionTest")] 781 781 public void TestMemberIfNoList() { 782 var first = Push GPParser.Parse("B");783 var second = Push GPParser.Parse("B");782 var first = PushParser.Parse("B"); 783 var second = PushParser.Parse("B"); 784 784 785 785 this.interpreter.CodeStack.Push(second, first); … … 805 805 [TestCategory("CodeExpressionTest")] 806 806 public void TestNthIfNoList() { 807 var prog = Push GPParser.Parse("A");808 var result = Push GPParser.Parse("A");807 var prog = PushParser.Parse("A"); 808 var result = PushParser.Parse("A"); 809 809 810 810 this.interpreter.IntegerStack.Push(3); … … 821 821 [TestCategory("CodeExpressionTest")] 822 822 public void TestNthIfEmpty() { 823 var prog = Push GPParser.Parse("( )");824 var result = Push GPParser.Parse("( )");823 var prog = PushParser.Parse("( )"); 824 var result = PushParser.Parse("( )"); 825 825 826 826 this.interpreter.IntegerStack.Push(3); … … 837 837 [TestCategory("CodeExpressionTest")] 838 838 public void TestNth() { 839 var prog = Push GPParser.Parse("( A B C D E )");840 var result = Push GPParser.Parse("D");839 var prog = PushParser.Parse("( A B C D E )"); 840 var result = PushParser.Parse("D"); 841 841 842 842 this.interpreter.IntegerStack.Push(3); … … 853 853 [TestCategory("CodeExpressionTest")] 854 854 public void TestNthWithTooBigN() { 855 var prog = Push GPParser.Parse("( A B C D E )");856 var result = Push GPParser.Parse("D");855 var prog = PushParser.Parse("( A B C D E )"); 856 var result = PushParser.Parse("D"); 857 857 858 858 this.interpreter.IntegerStack.Push(13); … … 869 869 [TestCategory("CodeExpressionTest")] 870 870 public void TestNthWithNegativeN() { 871 var prog = Push GPParser.Parse("( A B C D E )");872 var result = Push GPParser.Parse("D");871 var prog = PushParser.Parse("( A B C D E )"); 872 var result = PushParser.Parse("D"); 873 873 874 874 this.interpreter.IntegerStack.Push(-3); … … 885 885 [TestCategory("CodeExpressionTest")] 886 886 public void TestNthCdr() { 887 var prog = Push GPParser.Parse("( A B C D E )");888 var result = Push GPParser.Parse("D");887 var prog = PushParser.Parse("( A B C D E )"); 888 var result = PushParser.Parse("D"); 889 889 890 890 this.interpreter.IntegerStack.Push(2); … … 901 901 [TestCategory("CodeExpressionTest")] 902 902 public void TestNthCdrWithTooBigN() { 903 var prog = Push GPParser.Parse("( A B C D E )");904 var result = Push GPParser.Parse("D");903 var prog = PushParser.Parse("( A B C D E )"); 904 var result = PushParser.Parse("D"); 905 905 906 906 this.interpreter.IntegerStack.Push(10); … … 917 917 [TestCategory("CodeExpressionTest")] 918 918 public void TestNthCdrWithNegativeN() { 919 var prog = Push GPParser.Parse("( A B C D E )");920 var result = Push GPParser.Parse("D");919 var prog = PushParser.Parse("( A B C D E )"); 920 var result = PushParser.Parse("D"); 921 921 922 922 this.interpreter.IntegerStack.Push(-2); … … 933 933 [TestCategory("CodeExpressionTest")] 934 934 public void TestNthCdrIfEmpty() { 935 var prog = Push GPParser.Parse("( )");936 var result = Push GPParser.Parse("( )");935 var prog = PushParser.Parse("( )"); 936 var result = PushParser.Parse("( )"); 937 937 938 938 this.interpreter.IntegerStack.Push(3); … … 949 949 [TestCategory("CodeExpressionTest")] 950 950 public void TestNthCdrIfNoList() { 951 var prog = Push GPParser.Parse("A");952 var result = Push GPParser.Parse("A");951 var prog = PushParser.Parse("A"); 952 var result = PushParser.Parse("A"); 953 953 954 954 this.interpreter.IntegerStack.Push(3); … … 965 965 [TestCategory("CodeExpressionTest")] 966 966 public void TestNullTrue() { 967 var prog = Push GPParser.Parse("( )");967 var prog = PushParser.Parse("( )"); 968 968 969 969 this.interpreter.CodeStack.Push(prog); … … 979 979 [TestCategory("CodeExpressionTest")] 980 980 public void TestNullFalse() { 981 var prog = Push GPParser.Parse("A");981 var prog = PushParser.Parse("A"); 982 982 983 983 this.interpreter.CodeStack.Push(prog); … … 993 993 [TestCategory("CodeExpressionTest")] 994 994 public void TestPosition() { 995 var first = Push GPParser.Parse("( A B C D )");996 var second = Push GPParser.Parse("C");995 var first = PushParser.Parse("( A B C D )"); 996 var second = PushParser.Parse("C"); 997 997 998 998 this.interpreter.CodeStack.Push(second, first); … … 1008 1008 [TestCategory("CodeExpressionTest")] 1009 1009 public void TestQuote() { 1010 var result = Push GPParser.Parse("A");1010 var result = PushParser.Parse("A"); 1011 1011 1012 1012 this.interpreter.Run("( CODE.QUOTE A )"); … … 1021 1021 [TestCategory("CodeExpressionTest")] 1022 1022 public void TestSize() { 1023 var prog = Push GPParser.Parse("( A ( B ( C ) ) ( D ) INTEGER.+ )");1023 var prog = PushParser.Parse("( A ( B ( C ) ) ( D ) INTEGER.+ )"); 1024 1024 1025 1025 this.interpreter.CodeStack.Push(prog); … … 1035 1035 [TestCategory("CodeExpressionTest")] 1036 1036 public void TestSubstitude() { 1037 var first = Push GPParser.Parse("( A B C D A B C D )");1038 var second = Push GPParser.Parse("E");1039 var third = Push GPParser.Parse("A");1040 var result = Push GPParser.Parse("( E B C D E B C D )");1037 var first = PushParser.Parse("( A B C D A B C D )"); 1038 var second = PushParser.Parse("E"); 1039 var third = PushParser.Parse("A"); 1040 var result = PushParser.Parse("( E B C D E B C D )"); 1041 1041 1042 1042 this.interpreter.CodeStack.Push(third, second, first); -
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/ExampleTests.cs
r14727 r14733 159 159 [TestCategory("ExampleTest")] 160 160 public void Example11() { 161 var program = Push GPParser.Parse("( INTEGER.= CODE.QUOTE FLOAT.* CODE.QUOTE FLOAT./ CODE.IF )");161 var program = PushParser.Parse("( INTEGER.= CODE.QUOTE FLOAT.* CODE.QUOTE FLOAT./ CODE.IF )"); 162 162 163 163 this.interpreter.IntegerStack.Push(1, 1); … … 190 190 [TestCategory("ExampleTest")] 191 191 public void Example12() { 192 var program = Push GPParser.Parse("( INTEGER.= EXEC.IF FLOAT.* FLOAT./ )");192 var program = PushParser.Parse("( INTEGER.= EXEC.IF FLOAT.* FLOAT./ )"); 193 193 194 194 this.interpreter.IntegerStack.Push(1, 1); … … 274 274 [TestCategory("ExampleTest")] 275 275 public void Example16() { 276 var list = Push GPParser.Parse("( A B C )");276 var list = PushParser.Parse("( A B C )"); 277 277 278 278 this.interpreter.CodeStack.Push(list); -
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/ExecExpressionTests.cs
r14727 r14733 57 57 [TestCategory("ExecExpressionTest")] 58 58 public void TestK() { 59 var first = Push GPParser.Parse("A");60 var second = Push GPParser.Parse("B");61 var third = Push GPParser.Parse("C");59 var first = PushParser.Parse("A"); 60 var second = PushParser.Parse("B"); 61 var third = PushParser.Parse("C"); 62 62 63 63 this.interpreter.ExecStack.Push(third, second, first); … … 74 74 [TestCategory("ExecExpressionTest")] 75 75 public void TestS() { 76 var first = Push GPParser.Parse("A");77 var second = Push GPParser.Parse("B");78 var third = Push GPParser.Parse("C");79 var result = Push GPParser.Parse("( B C )");76 var first = PushParser.Parse("A"); 77 var second = PushParser.Parse("B"); 78 var third = PushParser.Parse("C"); 79 var result = PushParser.Parse("( B C )"); 80 80 81 81 this.interpreter.ExecStack.Push(third, second, first); … … 93 93 [TestCategory("ExecExpressionTest")] 94 94 public void TestY() { 95 var first = Push GPParser.Parse("A");96 var result = Push GPParser.Parse("( EXEC.Y A )");95 var first = PushParser.Parse("A"); 96 var result = PushParser.Parse("( EXEC.Y A )"); 97 97 98 98 this.interpreter.ExecStack.Push(first); -
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Tests/Interpreter/Expressions/StandardTests.cs
r14727 r14733 38 38 [TestMethod] 39 39 public void TestExpandGetHashCode() { 40 var expand = Push GPParser.Parse("( A B C D E F )");40 var expand = PushParser.Parse("( A B C D E F )"); 41 41 42 42 expand.GetHashCode();
Note: See TracChangeset
for help on using the changeset viewer.