Skip to content

A junit template for the ETH Algorithms and Probability course

License

Notifications You must be signed in to change notification settings

azurite/aw_template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A&W Programming Exercise Template

build

Features

  • IntelliJ config files adjusted for ETH judge (Runtime 1.6)

  • Easy setup: just unpack your input.zip and output.zip archives from cadmo.ethz.ch in the testCases folder and you're good to go

  • Structure for test files: pre-written JUnit tests for given .in and .out testcases

  • Easy-to-use interface consisting of often used code (see Main.java)

Example

test.java: Sample JUnit test for test files sample.in and sample.out. Repeat this for every pair of test files.

@Test
public void testSample() throws FileNotFoundException {
    String inPath = "testCases/sample.in";
    String outPath = "testCases/sample.out";

    init(outPath);

    Main.read_and_solve(
            new FileInputStream(inPath),
            new PrintStream(out)
    );

    assertEquals(expected, out.toString().replace("\r", ""));
}

About

A junit template for the ETH Algorithms and Probability course

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages