stack-machine-vimo/250827-stack-machine/stackmachine/src/test/java/microm/de/AppTest.java
2025-09-05 13:10:54 +02:00

55 lines
933 B
Java

package de.microm;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class AppTest
extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
public AppTest( String testName )
{
super( testName );
}
public void testAdd() {
StackMachine stackMachine = new StackMachine();
stackMachine.init(new byte[] {
0x00, 0x03, 0x00, 0x04, 0x02
});
while (stackMachine.exec()) {
}
assertEquals(0x07, stackMachine.getStack()[0]);
}
/**
* @return the suite of tests being tested
*/
public static Test suite()
{
return new TestSuite( AppTest.class );
}
/**
* Rigourous Test :-)
*/
public void testApp()
{
assertTrue( true );
}
}