Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go test update #120

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release-kotlin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
rustup toolchain install nightly-2024-02-01

# Update both toolchains
rustup update nightly-2024-02-01-2023-11-24
rustup update nightly-2023-11-24
rustup update nightly-2024-02-01

# Add target
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install Rust Toolchain
uses: RDXWorks-actions/toolchain@master
with:
toolchain: nightly-2024-02-01-2023-11-24
toolchain: nightly-2024-02-01
default: true
components: rustfmt, clippy
- name: Install cargo nextest
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Install Rust Toolchain
uses: RDXWorks-actions/toolchain@master
with:
toolchain: nightly-2024-02-01-2023-11-24
toolchain: nightly-2024-02-01
default: true
components: rustfmt
- name: Check formatting
Expand All @@ -60,7 +60,7 @@ jobs:
- name: Install Rust Toolchain
uses: RDXWorks-actions/toolchain@master
with:
toolchain: nightly-2024-02-01-2023-11-24
toolchain: nightly-2024-02-01
default: true
profile: minimal
- name: Cargo Check
Expand All @@ -72,7 +72,7 @@ jobs:
- name: Install Rust Toolchain
uses: RDXWorks-actions/toolchain@master
with:
toolchain: nightly-2024-02-01-2023-11-24
toolchain: nightly-2024-02-01
default: true
components: rustfmt, clippy
- name: Clippy Check
Expand Down
25 changes: 13 additions & 12 deletions crates/radix-engine-toolkit-uniffi/tests/bindings/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func newVirtualAccount(t *testing.T, networkId uint8) (*radix_engine_toolkit_uni
}

func TestRetManifestBuilder(t *testing.T) {
var networkId uint8 = 1
var networkId uint8 = 2 // Stokenet
var account, _, publicKey = newVirtualAccount(t, networkId)
var addresses = radix_engine_toolkit_uniffi.GetKnownAddresses(networkId)

Expand Down Expand Up @@ -111,7 +111,7 @@ func TestRetManifestBuilder(t *testing.T) {
assert(t, error == nil, "Transaction Intent compile failed")

intentHex := hex.EncodeToString(intentBytes)
assert(t, intentHex == "4d220104210707010a01000000000000000a0a0000000000000009010000002200012007210284bf" +
assert(t, intentHex == "4d220104210707020a01000000000000000a0a0000000000000009010000002200012007210284bf" +
"7562262bbd6940085748f3be6afa52ae317155181ece31b66351ccffa4b0010108000020220441038000c0566318c6318c6" +
"4f798cacc6318c6318cf7be8af78a78f8a6318c6318c60c086c6f636b5f666565210185000010632d5ec76b050000000000" +
"0000000000000000000041038000c0566318c6318c64f798cacc6318c6318cf7be8af78a78f8a6318c6318c60c046672656" +
Expand All @@ -123,7 +123,7 @@ func TestRetManifestBuilder(t *testing.T) {
}

func TestRetNotarizedTransaction(t *testing.T) {
var networkId uint8 = 1
var networkId uint8 = 2 // Stokenet
var account1, privateKey1, publicKey1 = newVirtualAccount(t, networkId)
var account2, privateKey2, _ = newVirtualAccount(t, networkId)
var addresses = radix_engine_toolkit_uniffi.GetKnownAddresses(networkId)
Expand All @@ -136,8 +136,8 @@ func TestRetNotarizedTransaction(t *testing.T) {
mb, err = mb.AccountWithdraw(account1, addresses.ResourceAddresses.Xrd, radix_engine_toolkit_uniffi.DecimalOne())
assert(t, err == nil, "AccountWithdraw failed")

mb, err = mb.AccountDepositEntireWorktop(account2)
assert(t, err == nil, "AccountDepositEntireWorktop failed")
mb, err = mb.AccountTryDepositEntireWorktopOrAbort(account2, nil)
assert(t, err == nil, "AccountTryDepositEntireWorktopOrAbort failed")

var transactionManifest = mb.Build(networkId)

Expand Down Expand Up @@ -175,18 +175,19 @@ func TestRetNotarizedTransaction(t *testing.T) {
var transactionBytes, _ = notarizedTransaction.Compile()

transactionHex := hex.EncodeToString(transactionBytes)
assert(t, transactionHex == "4d22030221022104210707010a01000000000000000a0a00000000000000090100000022000" +
assert(t, transactionHex == "4d22030221022104210707020a01000000000000000a0a00000000000000090100000022000" +
"12007210284bf7562262bbd6940085748f3be6afa52ae317155181ece31b66351ccffa4b0010108000020220341038000c0" +
"566318c6318c64f798cacc6318c6318cf7be8af78a78f8a6318c6318c60c086c6f636b5f666565210185000010632d5ec76" +
"b0500000000000000000000000000000041038000d1e120200bde95a52581c9284dab790cd0a1fd242eee0096186d6e5ef3" +
"670c087769746864726177210280005da66318c6318c61f5a61b4c6318c6318cf794aa8d295f14e6318c6318c685000064a" +
"7b3b6e00d0000000000000000000000000000000041038000d1e120200bde95a52581c9284dab790cd0a1fd242eee009618" +
"6d6e5ef3670c0d6465706f7369745f62617463682101830020200022010121020c0a746578742f706c61696e2200010c115" +
"36f6d7220585244205472616e736665722022020001210120074100df99c5ae00f9b69903074625de0d5175a89a0b2ae19d" +
"5cf599dbcb0be93512d838b58d9829a2b9afd3f511b97d3ce01f24a990186eb75f7092e496c54aef8406000121012007410" +
"0df99c5ae00f9b69903074625de0d5175a89a0b2ae19d5cf599dbcb0be93512d838b58d9829a2b9afd3f511b97d3ce01f24" +
"a990186eb75f7092e496c54aef84062200012101200741018588242bce5f10c823b7a7cc59cafaa958e2380a95867ee1f7b" +
"e78f8772092300373c892fb35f22f1392e2b9edd0833c3d655961e400ae954d2a6e18d1ad55e8",
"6d6e5ef3670c1a7472795f6465706f7369745f62617463685f6f725f61626f72742102830022000020200022010121020c0" +
"a746578742f706c61696e2200010c11536f6d7220585244205472616e7366657220220200012101200741009fc7e77ff3f1" +
"4ad73d83333f636f591933539126e4d9f226780a4fa273ed9fc905849b750318fc3ea50ef85bda0ba3ecb6778967e371555" +
"b48352d0d8d80dbf300012101200741009fc7e77ff3f14ad73d83333f636f591933539126e4d9f226780a4fa273ed9fc905" +
"849b750318fc3ea50ef85bda0ba3ecb6778967e371555b48352d0d8d80dbf32200012101200741010e0b2475a6b9ccc784b" +
"6e23c6766b0757b0d37d1beb825e7acd85cd8ec63badf660f5b34285e9cfb511325d5dc67e8494a973998298dc6076d548e" +
"36f80ef54d",
"Notarized Transaction bytes not equal")
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/build_wasm.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

cargo +nightly-2024-02-01-2023-11-24 build \
cargo +nightly-2024-02-01 build \
-Z build-std=std,panic_abort \
-Z build-std-features=panic_immediate_abort \
--manifest-path="$SCRIPT_DIR/../Cargo.toml" \
Expand Down
Loading