Compiler update (basic sc ready) (#31)
* refactored structs, the scope is not needed anymore + fix passing struct in func arguments. * implemented byte arrays and added runtime tests * Added sc examples in compiler README + added quick nested if test. * Updated README
This commit is contained in:
parent
de3395fb51
commit
2345858238
19 changed files with 464 additions and 215 deletions
|
@ -37,6 +37,7 @@ func TestAllCases(t *testing.T) {
|
|||
|
||||
// Blockchain specific
|
||||
testCases = append(testCases, storageTestCases...)
|
||||
testCases = append(testCases, runtimeTestCases...)
|
||||
|
||||
for _, tc := range testCases {
|
||||
b, err := compiler.Compile(strings.NewReader(tc.src), &compiler.Options{})
|
||||
|
@ -50,6 +51,7 @@ func TestAllCases(t *testing.T) {
|
|||
}
|
||||
|
||||
if bytes.Compare(b, expectedResult) != 0 {
|
||||
fmt.Println(tc.src)
|
||||
t.Log(hex.EncodeToString(b))
|
||||
dumpOpCodeSideBySide(b, expectedResult)
|
||||
t.Fatalf("compiling %s failed", tc.name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue