-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix tests regarding latest changes from origin
- Loading branch information
Showing
53 changed files
with
399 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../src/bindings/golang/wasm-go/functions.ts → ...ema/bind/src/bindings/golang/functions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * as Wasm from "./wasm"; | ||
export * as Functions from "./functions"; | ||
export * as Types from "./types"; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
packages/test-cases/cases/bind/sanity/output/wasm-go/types/enumwhile.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package types | ||
|
||
type While int32 | ||
|
||
const ( | ||
Whilefor = iota | ||
Whilein = iota | ||
whileMax = iota | ||
) | ||
|
||
func SanitizeWhileValue(value int32) { | ||
if !(value >= 0 && value < int32(whileMax)) { | ||
panic("Invalid value for enum 'While'") | ||
} | ||
} | ||
|
||
func GetWhileValue(key string) While { | ||
switch key { | ||
case "for": | ||
return Whilefor | ||
case "in": | ||
return Whilein | ||
default: | ||
panic("Invalid key for enum 'While'") | ||
} | ||
} | ||
|
||
func GetWhileKey(value While) string { | ||
SanitizeWhileValue(int32(value)) | ||
switch value { | ||
case Whilefor: | ||
return "for" | ||
case Whilein: | ||
return "in" | ||
default: | ||
panic("Invalid value for enum 'While'") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
packages/test-cases/cases/bind/sanity/output/wasm-go/types/object_custom_map_value.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package types | ||
|
||
import ( | ||
"github.com/consideritdone/polywrap-go/polywrap/msgpack" | ||
) | ||
|
||
type CustomMapValue struct { | ||
Foo string | ||
} | ||
|
||
func CustomMapValueToBuffer(value *CustomMapValue) []byte { | ||
return serializeCustomMapValue(value) | ||
} | ||
|
||
func CustomMapValueFromBuffer(data []byte) *CustomMapValue { | ||
return deserializeCustomMapValue(data) | ||
} | ||
|
||
func CustomMapValueWrite(writer msgpack.Write, value *CustomMapValue) { | ||
writeCustomMapValue(writer, value) | ||
} | ||
|
||
func CustomMapValueRead(reader msgpack.Read) *CustomMapValue { | ||
return readCustomMapValue(reader) | ||
} |
Oops, something went wrong.