Giter Site home page Giter Site logo

javalibtester's People

Contributors

s-edwards avatar testerviera avatar virag2487 avatar wjossey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

javalibtester's Issues

GitHub is deprecating direct downloads; need to mark a version of the library as a release

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.

Constructor blocks cause test failures

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);
    }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.