testerviera / javalibtester Goto Github PK
View Code? Open in Web Editor NEWJava libraries for Test-First Design and interactive games for novices
Java libraries for Test-First Design and interactive games for novices
According to http://www.ccs.neu.edu/javalib/Tester/, GitHub provides "sources, documentation and downloads" for the Tester libraries. Going to the repo homepage on GitHub, there is no longer a downloads button. A direct link, https://github.com/downloads/TesterViera/JavaLibTester/tester-1.5.2.1.jar, still works but is undiscoverable -- and according to https://github.com/blog/1302-goodbye-uploads, they'll continue to work for now. Still, a better solution is to create "releases", according to that page.
This program demonstrates a possible bug in the tester library with
array lists constructed using constructor blocks. The first test
does not use constructor blocks and works as expected. The second
gives equivalent definitions in terms of constructor blocks, but
causes an error when tested.
Note that the reported actual and expected values are Examples(!)
objects, not array lists.
javac -cp tester.jar TesterBug.java
java -cp tester.jar: tester.Main Examples
---------------------------------
Tests for the class: Examples
Tester Prima v.1.5.2.1
-----------------------------------
Tests defined in the class: Examples:
---------------------------
Examples:
---------------
new Examples:1()
---------------
Ran 2 tests.
1 test failed.
Failed test results:
--------------
Error in test number 2
tester.ErrorReport: Error trace:
at Examples.testBad(TesterBug.java:32)
actual: expected:
new Examples$1:1(................................ new Examples$2:1(
this.size = 1 this.size = 1
this.this$0 = this.this$0 =
new Examples:2()) new Examples:2())
--- END OF TEST RESULTS ---
import tester.*;
import java.util.ArrayList;
class Examples {
void testGood(Tester t) {
ArrayList<Integer> is = new ArrayList<Integer>();
is.add(5);
ArrayList<Integer> js = new ArrayList<Integer>();
js.add(5);
t.checkExpect(is, js);
}
void testBad(Tester t) {
ArrayList<Integer> is = new ArrayList<Integer>() {{
add(5);
}};
ArrayList<Integer> js = new ArrayList<Integer>() {{
add(5);
}};
t.checkExpect(is, js);
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.