package tk.hintss.jbrainfuck;

import org.junit.Test;

import static org.junit.Assert.*;

/**
 * Created by Henry on 1/18/2015.
 */
public class InterpreterTest {
    @Test
    public void interpretert() {
        Interpreter bfInter = new Interpreter(".");
        bfInter.exec();
        assertEquals(". outputs the current byte", "\0", bfInter.getOutput());
        assertEquals("getNewOutput() returns new output", "\0", bfInter.getNewOutput());
        assertEquals("getNewOutput() ONLY returns new output", "", bfInter.getNewOutput());
    }
}

@@ -323,16 +323,47 @@
 ent byte
+ and getOutput() returns output
 %22, %22%5C0%22,
@@ -561,21 +561,916 @@
 ewOutput());
+%0A%0A        bfInter = new Interpreter(%22+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.%22); // A%0A        bfInter.exec();%0A        assertEquals(%22+ increments properly%22, %22A%22, bfInter.getOutput());%0A%0A        bfInter = new Interpreter(%22++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-.%22); // A%0A        bfInter.exec();%0A        assertEquals(%22- decrements properly%22, %22A%22, bfInter.getOutput());%0A%0A        bfInter = new Interpreter(%22+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%3E++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%3C.%3E.%22); // AB%0A        bfInter.exec();%0A        assertEquals(%22%3E and %3C work%22, %22AB%22, bfInter.getOutput());%0A%0A        bfInter = new Interpreter(%22+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++%5B%3E+%3C-%5D%3E.%22); // A%0A        bfInter.exec();%0A        assertEquals(%22%5B and %5D work%22, %22A%22, bfInter.getOutput());
 %0A    %7D%0A%7D%0A

add some more unit tests