Permalink
Browse files

Updated for better wording

  • Loading branch information...
1 parent 0d71afd commit be699be18f7739e75157b3df7ccc861f8bbeab61 @ivanjovanovic committed Apr 13, 2012
Showing with 7 additions and 6 deletions.
  1. +7 −6 dcpu16/assembler/assembler_test.go
@@ -48,17 +48,18 @@ func printMemory(spec, assembled []string) {
}
}
-func TestAssembler(t *testing.T) {
- inputLines := readLines("test/spec.dasm")
- memoryImage := Assemble(inputLines)
+func TestAssemblerSpecification(t *testing.T) {
+ programLines := readLines("test/spec.dasm")
memorySpec := readLines("test/spec.mem")
- relevantMemoryImage := castMemoryContent(memoryImage)[0:len(memorySpec)]
+ memoryImage := Assemble(programLines)
- same := assertSame(memorySpec, relevantMemoryImage)
+ comparableMemoryImage := castMemoryContent(memoryImage)[0:len(memorySpec)]
+
+ same := assertSame(memorySpec, comparableMemoryImage)
if !same {
- printMemory(memorySpec, relevantMemoryImage)
+ printMemory(memorySpec, comparableMemoryImage)
t.Error("Returned memory different from specified")
}
}

0 comments on commit be699be

Please sign in to comment.