Beispiel #1
0
 private static void Test(int n, string expected)
 {
     RootTerm.Sqrt(n).ToString().Should().Be(expected, "sqrt({0}) is {1}", n, expected);
 }
Beispiel #2
0
 private static void Test(int a, int b, string expected)
 {
     Test(RootTerm.Sqrt(a), RootTerm.Sqrt(b), expected);
     Test(RootTerm.Sqrt(b), RootTerm.Sqrt(a), expected);
 }
Beispiel #3
0
 private static void Test(RootTerm a, RootTerm b, string expected)
 {
     a.Add(b).ToString().Should().Be(expected, "{0} + {1} = {2}", a, b, expected);
     (a + b).ToString().Should().Be(expected, "{0} + {1} = {2}", a, b, expected);
 }
Beispiel #4
0
 private static void Test(RootTerm a, RootTerm b, string expected)
 {
     a.Multiply(b).ToString().Should().Be(expected, "{0} * {1} = {2}", a, b, expected);
     (a * b).ToString().Should().Be(expected, "{0} * {1} = {2}", a, b, expected);
 }