diff --git a/Lab4/Lab4.pdf b/Lab4/Lab4.pdf index 976400e..0b1b4e4 100644 Binary files a/Lab4/Lab4.pdf and b/Lab4/Lab4.pdf differ diff --git a/Lab4/Test1.java b/Lab4/Test1.java index 5dd514b..bbe5406 100644 --- a/Lab4/Test1.java +++ b/Lab4/Test1.java @@ -28,8 +28,5 @@ class Test1 { "string", baos, old); - - we.showStat(); - we.print(); } } \ No newline at end of file diff --git a/Lab4/Test2.java b/Lab4/Test2.java index e1e22e7..add4b3f 100644 --- a/Lab4/Test2.java +++ b/Lab4/Test2.java @@ -38,8 +38,5 @@ class Test2 { "", baos, old); - - we.showStat(); - we.print(); } } \ No newline at end of file diff --git a/Lab4/Test3.java b/Lab4/Test3.java index 421fc63..08e8380 100644 --- a/Lab4/Test3.java +++ b/Lab4/Test3.java @@ -13,18 +13,6 @@ class Test3 { } } - we.prefix("jshell> class Incr implements Immutator {"); - we.prefix(" ...> public Integer invoke(Integer t1) {"); - we.prefix(" ...> return t1 + 1;"); - we.prefix(" ...> }"); - we.prefix(" ...> }"); - - we.prefix("jshell> class Length implements Immutator {"); - we.prefix(" ...> public Integer invoke(String t1) {"); - we.prefix(" ...> return t1.length();"); - we.prefix(" ...> }"); - we.prefix(" ...> }"); - we.expect("new Incr().invoke(4)", new Incr().invoke(4).toString(), "5"); @@ -50,8 +38,5 @@ class Test3 { we.expect("new Improbable<>().invoke(new Improbable<>().invoke(1))", new Improbable<>().invoke(new Improbable().invoke(1)).toString(), "<<1>>"); - - we.showStat(); - we.print(); } } \ No newline at end of file diff --git a/Lab4/Test4.java b/Lab4/Test4.java index cde82dd..96bacab 100644 --- a/Lab4/Test4.java +++ b/Lab4/Test4.java @@ -13,18 +13,6 @@ class Test4 { } } - we.prefix("jshell> class Incr implements Immutator {"); - we.prefix(" ...> public Integer invoke(Integer t1) {"); - we.prefix(" ...> return t1 + 1;"); - we.prefix(" ...> }"); - we.prefix(" ...> }"); - - we.prefix("jshell> class Length implements Immutator {"); - we.prefix(" ...> public Integer invoke(String t1) {"); - we.prefix(" ...> return t1.length();"); - we.prefix(" ...> }"); - we.prefix(" ...> }"); - we.expect("Probably.just(4).transform(new Incr())", Probably.just(4).transform(new Incr()).toString(), "<5>"); @@ -47,8 +35,5 @@ class Test4 { we.expect("Probably.just(null).transform(new Length()).transform(new Incr())", Probably.just(null).transform(new Length()).transform(new Incr()).toString(), "<>"); - - we.showStat(); - we.print(); } } \ No newline at end of file diff --git a/Lab4/Test5.java b/Lab4/Test5.java index 244174f..0a5a777 100644 --- a/Lab4/Test5.java +++ b/Lab4/Test5.java @@ -13,18 +13,6 @@ class Test5 { } } - we.prefix("jshell> class Incr implements Immutator {"); - we.prefix(" ...> public Integer invoke(Integer t1) {"); - we.prefix(" ...> return t1 + 1;"); - we.prefix(" ...> }"); - we.prefix(" ...> }"); - - we.prefix("jshell> class Length implements Immutator {"); - we.prefix(" ...> public Integer invoke(String t1) {"); - we.prefix(" ...> return t1.length();"); - we.prefix(" ...> }"); - we.prefix(" ...> }"); - we.expect("Probably.just(17).check(new IsModEq(3,2)) // 17 % 3 is equal to 2", Probably.just(17).check(new IsModEq(3,2)).toString(), "<17>"); @@ -41,8 +29,5 @@ class Test5 { we.expect("Probably.just(null).check(new IsModEq(0,2))", Probably.just(null).check(new IsModEq(0,2)).toString(), "<>"); - - we.showStat(); - we.print(); } } \ No newline at end of file diff --git a/Lab4/Test6.java b/Lab4/Test6.java index 895cd6f..c1949ff 100644 --- a/Lab4/Test6.java +++ b/Lab4/Test6.java @@ -18,21 +18,6 @@ class Test6 { Probably> noIncr = Probably.none(); Probably> noLength = Probably.none(); - we.prefix("jshell> class Incr implements Immutator {"); - we.prefix(" ...> public Integer invoke(Integer t1) {"); - we.prefix(" ...> return t1 + 1;"); - we.prefix(" ...> }"); - - we.prefix("jshell> class Length implements Immutator {"); - we.prefix(" ...> public Integer invoke(String t1) {"); - we.prefix(" ...> return t1.length();"); - we.prefix(" ...> }"); - - we.prefix("jshell> Probably> justIncr = Probably.just(new Incr());"); - we.prefix("jshell> Probably> justLength = Probably.just(new Length());"); - we.prefix("jshell> Probably> noIncr = Probably.none();"); - we.prefix("jshell> Probably> noLength = Probably.none();"); - we.expect("Probably.just(17).apply(justIncr)", Probably.just(17).apply(justIncr).toString(), "<18>"); @@ -58,8 +43,5 @@ class Test6 { we.expect("Probably.none().apply(noLength)", Probably.none().apply(noLength).toString(), "<>"); - - we.showStat(); - we.print(); } } \ No newline at end of file diff --git a/Lab4/TestProbably.java b/Lab4/TestProbably.java index a73813b..55fe50d 100644 --- a/Lab4/TestProbably.java +++ b/Lab4/TestProbably.java @@ -54,8 +54,5 @@ class TestProbably { we.expect("Probably.none() == Probably.just(null)", Probably.none() == Probably.just(null), true); - - // we.showStat(); - // we.print(); } -} +} \ No newline at end of file