Website Summary Files Commits Branches @commit @diff @stats
path: root / homework / 81319 / bfinterpreter / bf / interpreter_test.go
diff options
context:
space:
mode:
1 files changed, 0 insertions, 58 deletions
-rw-r--r--homework/81319/bfinterpreter/bf/interpreter_test.go58
diff --git a/homework/81319/bfinterpreter/bf/interpreter_test.go b/homework/81319/bfinterpreter/bf/interpreter_test.go
deleted file mode 100644
index a798669..0000000
--- a/homework/81319/bfinterpreter/bf/interpreter_test.go
+++ /dev/null
@@ -1,58 +0,0 @@
-package bf
-
-import (
- "bufio"
- "io"
- "os"
- "testing"
-)
-
-func TestInterpretInstruction(t *testing.T) {
- var writer io.Writer
-
- writer = flushingWriter{
- w: bufio.NewWriter(os.Stdout),
- }
-
- src := []instruction{
- {
- idx: 0,
- instructionType: incD,
- },
- }
-
- for i := 0; i < 65; i++ {
- src = append(src, instruction{
- idx: uint(i),
- instructionType: incD,
- })
- }
-
- src = append(src, instruction{
- idx: 65,
- instructionType: outD,
- })
-
- intepreterState := state{
- src: src,
- buffer: make([]byte, 1),
- writer: writer,
- }
-
- writer.Write([]byte("hello\n"))
-
- for i := 0; i < 66; i++ {
- intepreterState.interpretInstruction()
- }
-
- intepreterState.interpretInstruction()
-
-}
-
-func TestInterpreter(t *testing.T) {
- input := ","
- interpreter := NewInterpreter(input)
-
- Run(interpreter)
-
-}