wmcnicho / QCP_SP2015

A quantum computing emulator made by undergraduates at University of Edinburgh
0 stars 0 forks source link

Unit Tests #9

Open wmcnicho opened 9 years ago

wmcnicho commented 9 years ago

I've added a new uniTests package to our project. Creating and running JUnit tests is pretty easy in Eclipse. To make a new test just do File -> New -> JUnit Test Case and select the class you want to test. You can have multiple tests in each test case.

For more help on setting up you go here: http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2FgettingStarted%2Fqs-junit.htm

The basic rule of thumb is that you create your class, call a method for that class on test data, assert that the method worked as you expected it to, and repeat until you want to gouge your eyes out with a screwdriver.

Alt text