public void TestConstantDydx() { Parser p = new Parser("10"); Node n = p.Parse(); n = Derivator.dydx(n); if (n.Payload != "0") { Assert.Fail(); } }
public void TestMultiplicationDydx() { Parser p = new Parser("2x"); Node n = p.Parse(); Node dydx = Derivator.dydx(n); Node realdydx = (new Parser("(0*x)+(1*2)")).Parse(); if (!Node.IsEqual(dydx, realdydx)) { Assert.Fail(); } }