public void AssignObjectReferenceFromMemory() { SnapshotTester <Snapshot> tester = new SnapshotTester <Snapshot>(); tester.Var("a").Field("f").Write("a.1"); tester.Var("b").Write(tester.Var("a")); tester.Var("a").Field("g").Write("a.2"); tester.Var("b").Field("h").Write("b.3"); tester.Var("c").Field("f").Write("c.4"); tester.Var("d").Write(tester.Var("c")); tester.Var("d").Field("g").Write("d.5"); tester.Var("arr").Index("i").Write("i"); tester.Var("arr").Index().Write(tester.Var("a")); tester.Var("arr").Index("i").Field("f").Write("arr[i].6"); tester.Var("arr").Index().Field("g").Write("arr[?].7"); tester.Var("arr").Index().Write(tester.Var("c")); tester.Var("arr").Index("i").Field("f").Write("arr[i].8"); tester.Var("arr").Index().Field("g").Write("arr[?].9"); tester.Var("a").Field("f").Write("a.10"); tester.SetLogger(new FileLogger("AssignObjectReferenceFromMemory.txt")); tester.Test(); }
public void MergeArrayTest() { SnapshotTester <Snapshot> prepareA = new SnapshotTester <Snapshot>(); prepareA.Var("v").Index().Write("A.?"); prepareA.Var("v").Index("a").Write("A.1"); prepareA.Var("v").Index("b").Write("2"); prepareA.Var("v").Index("c").Write("A.3"); prepareA.Var("v").Index("e").Index("1").Write("A.4"); prepareA.Var("v").Index("f").Index("1").Write("A.5"); prepareA.Var("v").Index("g").Index("1").Write("A.6"); prepareA.Var().Index("1").Write("A.7"); prepareA.Test(); SnapshotTester <Snapshot> prepareB = new SnapshotTester <Snapshot>(); prepareB.Var("v").Index("a").Write("B.1"); prepareB.Var("v").Index("b").Write("2"); prepareB.Var("v").Index("d").Write("B.3"); prepareB.Var("v").Index("e").Index("1").Write("B.4"); prepareB.Var("v").Index("g").Write("B.6"); prepareB.Var("a").Index("1").Write("B.7"); prepareB.Var("b").Write("B.8"); prepareB.Test(); SnapshotTester <Snapshot> tester = new SnapshotTester <Snapshot>(); tester.SetLogger(new FileLogger("MergeArrayTest.txt")); tester.Merge(prepareA.Snapshot, prepareB.Snapshot); tester.Test(); }
public void assignTest() { SnapshotTester <Snapshot> tester = new SnapshotTester <Snapshot>(); tester.Var("a").Write(1); tester.SetLogger(new FileLogger("assignTest.txt")); tester.Test(); }
public void AssignUndefinedFromMemory() { SnapshotTester <Snapshot> tester = new SnapshotTester <Snapshot>(); tester.Var("b").Write(1); tester.Var("b").Write(tester.Var("a")); tester.SetLogger(new FileLogger("AssignUndefinedFromMemory.txt")); tester.Test(); }
public void assignArrayConcretizationTest() { SnapshotTester <Snapshot> tester = new SnapshotTester <Snapshot>(); tester.Var("a").Index().Index("2").Index("3").Write(1); tester.Var("a").Index("1").Index().Index("3").Write(2); tester.Var("a").Index("1").Index("2").Index("3").Write(3); tester.SetLogger(new FileLogger("assignArrayConcretizationTest.txt")); tester.Test(); }
public void destroyAliasTest() { SnapshotTester <Snapshot> tester = new SnapshotTester <Snapshot>(); tester.Var("a").Alias(tester.Var("b")); tester.Var("c").Alias(tester.Var("b")); tester.Var("b").Alias(tester.Var("x")); tester.SetLogger(new FileLogger("destroyAliasTest.txt")); tester.Test(); }
public void aliasArrayTest() { SnapshotTester <Snapshot> tester = new SnapshotTester <Snapshot>(); tester.Var("a").Index("1").Alias(tester.Var("x1")); tester.Var("a").Index().Index("2").Alias(tester.Var("x2")); tester.Var("a").Index("3").Index("4").Write("a-3-4 .1"); tester.SetLogger(new FileLogger("aliasArrayTest.txt")); tester.Test(); }
public void assignObjectTest() { SnapshotTester <Snapshot> tester = new SnapshotTester <Snapshot>(); tester.Var("a").Index().Field("f").Write(1); tester.Var("a").Index("1").Field("f").Write(2); tester.Var("a").Index("1").Field("g").Write(4); tester.Var("a").Index("2").Field("g").Write(5); tester.SetLogger(new FileLogger("assignObjectTest.txt")); tester.Test(); }
public void aliasUnknownIndexTest() { SnapshotTester <Snapshot> tester = new SnapshotTester <Snapshot>(); tester.Var("x").Write("x.1"); tester.Var("a").Index("1").Write("a[1].2"); tester.Var("a").Index().Alias(tester.Var("x")); tester.Var("a").Index("2").Write("a[2].3"); tester.Var("a").Index("3").Alias(tester.Var("x")); tester.Var("a").Index("4", "5").Write("4"); tester.SetLogger(new FileLogger("aliasUnknownIndexTest.txt")); tester.Test(); }
public void OverrideArray() { SnapshotTester <Snapshot> tester = new SnapshotTester <Snapshot>(); tester.Var("a").Index("1").Write(1); tester.Var("a").Index("2").Index("2").Write(2); tester.Var("a").Index("2").Index().Write(3); tester.Var("a").Index("2").Index().Index("4").Write(4); tester.Var("a").Index("5").Write(5); tester.Var("a").Index("6").Write(6); tester.Var("a").Write("OVERRIDE"); tester.SetLogger(new FileLogger("OverrideArray.txt")); tester.Test(); }
public void AssignScalarFromMemory() { SnapshotTester <Snapshot> tester = new SnapshotTester <Snapshot>(); tester.Var("a").Write("A"); tester.Var("d").Write("D"); tester.Var("b").Write(tester.Var("a")); tester.Var("c").Index("1").Write(2); tester.Var("c").Index("2").Write(tester.Var("a")); tester.Var("c").Index().Write(tester.Var("d")); tester.SetLogger(new FileLogger("AssignScalarFromMemory.txt")); tester.Test(); }
public void assignArrayFromUnknownTest() { SnapshotTester <Snapshot> tester = new SnapshotTester <Snapshot>(); tester.Var("a").Index().Index().Write(1); tester.Var("a").Index().Index("3").Write(2); tester.Var("a").Index("5").Index().Write(3); tester.Var("a").Index("5").Index("6").Write(4); tester.Var("a").Index("5").Index("7").Write(7); tester.Var("a").Index("5").Index("8").Index("8").Write(8); tester.Var("a").Index().Write(5); tester.Var("a").Index("5").Index("6").Index("9").Write(6); tester.SetLogger(new FileLogger("assignArrayFromUnknownTest.txt")); tester.Test(); }
public void aliasCopyArrayTest() { SnapshotTester <Snapshot> tester = new SnapshotTester <Snapshot>(); tester.Var("a").Index("1").Alias(tester.Var("x")); tester.Var("a").Index("2").Alias(tester.Var("y1", "y2")); tester.Var("a").Index("3").Write(1); tester.Var("a").Index("4").Index("4").Alias(tester.Var("z")); tester.Var("b").Write(tester.Var("a")); tester.Var("c").Write(tester.Var("a", "u")); tester.SetLogger(new FileLogger("aliasCopyArrayTest.txt")); tester.Test(); }
public void aliasAssignTest() { SnapshotTester <Snapshot> tester = new SnapshotTester <Snapshot>(); tester.Var("a").Alias(tester.Var("b")); tester.Var("b").Write("b.1"); tester.Var("c").Alias(tester.Var("b")); tester.Var("x", "y").Alias(tester.Var("b")); tester.Var("b").Write("b.2"); tester.Var("x").Write("x.3"); tester.Var("z").Alias(tester.Var("x")); tester.SetLogger(new FileLogger("aliasAssignTest.txt")); tester.Test(); }
public void AssignStrongArrayFromMemory() { SnapshotTester <Snapshot> tester = new SnapshotTester <Snapshot>(); tester.Var("a").Index("1").Write(1); tester.Var("a").Index("2").Index("2").Write(2); tester.Var("a").Index("2").Index().Write(3); tester.Var("a").Index("2").Index().Index("4").Write(4); tester.Var("a").Index("5").Write(5); tester.Var("a").Index("6").Write(6); tester.Var("b").Write(tester.Var("a")); tester.Var("a").Index("1").Write(7); tester.Var("b").Index("1").Write(8); tester.Var("b").Index("2").Index("2").Write(9); tester.SetLogger(new FileLogger("AssignStrongArrayFromMemory.txt")); tester.Test(); }
public void aliasUnknownCopyArrayTest() { SnapshotTester <Snapshot> tester = new SnapshotTester <Snapshot>(); tester.Var("a").Index("1").Alias(tester.Var("x")); tester.Var("a").Index("2").Write(1); tester.Var("a").Index().Alias(tester.Var("y")); tester.Var("a").Index("3").Write(2); tester.Var("b").Write(tester.Var("a")); tester.Var("b").Index("4").Write(3); tester.Var("a").Index("4").Write(4); tester.Var("a").Index("5").Write(5); tester.Var("c").Write(tester.Var("a", "u")); tester.SetLogger(new FileLogger("aliasUnknownCopyArrayTest.txt")); tester.Test(); }
public void readObjectTest() { SnapshotTester <Snapshot> prepare = new SnapshotTester <Snapshot>(); prepare.Var("a").Index().Field("f").Write(1); prepare.Var("a").Index("1").Field("f").Write(2); prepare.Var("a").Index("1").Field("g").Write(3); prepare.Var("a").Index("2").Field("g").Write(4); prepare.Var("b").Index("1").Field("f").Write(5); prepare.Var("b").Index("1").Field("g").Write(6); prepare.Test(); SnapshotTester <Snapshot> tester = new SnapshotTester <Snapshot>(prepare.Snapshot); tester.SetLogger(new FileLogger("readObjectTest.txt")); tester.Var("a").Index().Field("f").Read(); tester.Var("a").Index("1").Field("f").Read(); tester.Var("a").Index("1").Field("g").Read(); tester.Var("a").Index("2").Field("g").Read(); tester.Var("a").Index("2").Field("f").Read(); tester.Var("a").Index("3").Field("f").Read(); tester.Var("a").Index("3").Field("g").Read(); tester.Var("a").Index("3").Field("u").Read(); tester.Var("a").Read(); tester.Var("c").Read(); tester.Var("b").Index("i").Read(); tester.Var("a").Index("1").Field("f", "g").Read(); tester.Var("a").Index().Field("f", "g").Read(); tester.Var().Index().Field("f").Read(); tester.Var("b").Index().Field("f").Read(); tester.Var("b").Index("1").Field("f").Read(); tester.Var().Index("1").Field("f").Read(); tester.Test(); }
public void MergeVariableTest() { SnapshotTester <Snapshot> prepareA = new SnapshotTester <Snapshot>(); prepareA.Var("a").Write("A.1"); prepareA.Var("b").Write("2"); prepareA.Var("c").Write("A.3"); prepareA.Test(); SnapshotTester <Snapshot> prepareB = new SnapshotTester <Snapshot>(); prepareB.Var("a").Write("B.1"); prepareB.Var("b").Write("2"); prepareB.Var("d").Write("B.3"); prepareB.Test(); SnapshotTester <Snapshot> tester = new SnapshotTester <Snapshot>(); tester.SetLogger(new FileLogger("MergeVariableTest.txt")); tester.Merge(prepareA.Snapshot, prepareB.Snapshot); tester.Test(); }