Skip to content

ellotheth/coursera-algo-i

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Coursera

Algorithms I (Fall 2013)

Unit tests for assignments and exercises in Coursera's Algorithms I class.

maketest

My current directory structure has individual project folders (e.g. the Percolation assignment) at the top level of my Algorithms I path. This repo of unit tests sits at the same level:

~/algo4/percolation # percolation assignment
~/algo4/unionfind   # union find exercise
~/algo4/test        # this repo

To make life easier, maketest can be run from a project folder to bootstrap a JUnit test class in the unit test directory and symlink it to the project:

$ cd ~/algo4/percolation
$ ls
Percolation.java Makefile
$ maketest Percolation ../test
$ ls
Percolation.java Makefile TestPercolation.java
$ ls -l
... TestPercolation.java -> ../test/percolation/TestPercolation.java
$ cat TestPercolation.java
import static org.junit.Assert.*;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;

public class TestPercolation {

    @Before
    public void setUp() {}

    @After
    public void tearDown() {}

    @Test
    public void test() {}

}

Other related stuff:

About

Various and sundry unit tests for Coursera's Algorithms I class

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published