ソースを参照

simplify test

Signed-off-by: xermicus <cyrill@parity.io>
xermicus 2 年 前
コミット
e5f9978777

+ 1 - 1
integration/substrate/upgradeable_proxy.spec.ts

@@ -67,7 +67,7 @@ describe('Deploy the upgradable proxy and implementations; expect the upgrade me
         count = await query(conn, alice, counter, "count");
         expect(BigInt(count.output?.toString() ?? "")).toStrictEqual(3n);
 
-        //gasLimit = await weight(conn, counter, 'dec', []);
+        gasLimit = await weight(conn, counter, 'dec', []);
         await transaction(counter.tx.dec({ gasLimit }), alice);
         count = await query(conn, alice, counter, "count");
         expect(BigInt(count.output?.toString() ?? "")).toStrictEqual(2n);

+ 2 - 2
tests/substrate_tests/calls.rs

@@ -1055,13 +1055,13 @@ fn constructors_and_messages_distinct_in_dispatcher() {
         }"##,
     );
 
-    let constructor = 0x00010203u32.to_be_bytes().to_vec();
+    let constructor = vec![0, 1, 2, 3];
     // Given this constructor selector works as intended
     runtime.raw_constructor(constructor.clone());
     // Expect calling the constructor via "call" to trap the contract
     runtime.raw_function_failure(constructor);
 
-    let function = 0x04050607u32.to_be_bytes().to_vec();
+    let function = vec![4, 5, 6, 7];
     // Given this function selector works as intended
     runtime.raw_function(function.clone());
     // Expect calling the function via "deploy" to trap the contract