15 lines
253 B
Go
15 lines
253 B
Go
|
package intcode
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestNewProgram(t *testing.T) {
|
||
|
want := fmt.Sprintf("%v", []int{1})
|
||
|
p := NewProgram([]int{1})
|
||
|
if got := p.CodeString(); got != want {
|
||
|
t.Errorf("Program.CodeString() = %q, want %q", got, want)
|
||
|
}
|
||
|
}
|