Changeset 16386 for branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/InfixExpressionParserTest.cs
- Timestamp:
- 12/15/18 12:07:16 (6 years ago)
- Location:
- branches/2925_AutoDiffForDynamicalModels
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2925_AutoDiffForDynamicalModels
- Property svn:mergeinfo changed
-
branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Tests
- Property svn:mergeinfo changed
-
branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Tests/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4/InfixExpressionParserTest.cs
r15583 r16386 61 61 62 62 Console.WriteLine(formatter.Format(parser.Parse("log(3)"))); 63 Console.WriteLine(formatter.Format(parser.Parse("log(-3)"))); 63 Console.WriteLine(formatter.Format(parser.Parse("log(-3)"))); // should produce log(-3) as output 64 64 Console.WriteLine(formatter.Format(parser.Parse("exp(3)"))); 65 Console.WriteLine(formatter.Format(parser.Parse("exp(-3)"))); 65 Console.WriteLine(formatter.Format(parser.Parse("exp(-3)"))); // should produce exp(-3) as output 66 66 Console.WriteLine(formatter.Format(parser.Parse("sqrt(3)"))); 67 67 68 Console.WriteLine(formatter.Format(parser.Parse("sqr((-3))"))); 68 Console.WriteLine(formatter.Format(parser.Parse("sqr((-3))"))); // should produce sqr((-3)) as output 69 69 70 Console.WriteLine(formatter.Format(parser.Parse("3/3+2/2+1/1"))); 71 Console.WriteLine(formatter.Format(parser.Parse("-3+30-2+20-1+10"))); 70 Console.WriteLine(formatter.Format(parser.Parse("3/3+2/2+1/1"))); // ((3 * 1 / 3) + (2 * 1 / 2) + (1 * 1 / 1)) 71 Console.WriteLine(formatter.Format(parser.Parse("-3+30-2+20-1+10"))); // not (30 + 20 + 10 + ((-1) * (3 + 2 + 1))) 72 72 // round trip 73 Console.WriteLine(formatter.Format(parser.Parse(formatter.Format(parser.Parse("-3+30-2+20-1+10"))))); 73 Console.WriteLine(formatter.Format(parser.Parse(formatter.Format(parser.Parse("-3+30-2+20-1+10"))))); // not (30 + 20 + 10 + ((-(1)) * (3 + 2 + 1))) 74 74 75 75 Console.WriteLine(formatter.Format(parser.Parse("\"x1\"")));
Note: See TracChangeset
for help on using the changeset viewer.