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:
Anthony De Meulemeester 2018-02-27 10:04:24 +01:00 committed by GitHub
parent de3395fb51
commit 2345858238
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 464 additions and 215 deletions

View file

@ -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)