Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated for better wording

  • Loading branch information...
commit be699be18f7739e75157b3df7ccc861f8bbeab61 1 parent 0d71afd
Ivan Jovanovic authored
Showing with 7 additions and 6 deletions.
  1. +7 −6 dcpu16/assembler/assembler_test.go
13 dcpu16/assembler/assembler_test.go
View
@@ -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")
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.