input: add exhaustive unit tests for new taproot scripts

This commit is contained in:
Olaoluwa Osuntokun
2023-02-04 15:09:32 +02:00
parent b8d1596428
commit 5e921376c4
4 changed files with 2283 additions and 78 deletions

View File

@@ -52,7 +52,7 @@ func assertEngineExecution(t *testing.T, testNum int, valid bool,
if err != nil {
t.Fatalf("stepping (%v)\n", err)
}
debugBuf.WriteString(fmt.Sprintf("stepping %v\n", dis))
debugBuf.WriteString(fmt.Sprintf("Stepping %v\n", dis))
done, err = vm.Step()
if err != nil && valid {
@@ -65,8 +65,11 @@ func assertEngineExecution(t *testing.T, testNum int, valid bool,
"should be invalid: %v", testNum, err)
}
debugBuf.WriteString(fmt.Sprintf("Stack: %v", vm.GetStack()))
debugBuf.WriteString(fmt.Sprintf("AltStack: %v", vm.GetAltStack()))
debugBuf.WriteString(fmt.Sprintf("Stack: %v\n",
vm.GetStack()))
debugBuf.WriteString(fmt.Sprintf("AltStack: %v\n",
vm.GetAltStack()))
debugBuf.WriteString("-----\n")
}
// If we get to this point the unexpected case was not reached