Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
58c6636
initial setup
kentosugama Mar 10, 2023
551bc8c
add wasm-opt crate
kentosugama Apr 6, 2023
9e77b4b
wasm-opt scaffolding
kentosugama Apr 6, 2023
cbc47eb
remove boiler
kentosugama Apr 6, 2023
959a69d
scaffold
kentosugama Apr 6, 2023
cf8e985
extract the custom sectionsg
kentosugama Apr 6, 2023
645fc35
reinsert data sections
kentosugama Apr 6, 2023
6c41502
let user specify optimization level
kentosugama Apr 6, 2023
077559f
use proper temp file
kentosugama Apr 7, 2023
a7af326
recurse for actor classes
kentosugama Apr 7, 2023
c59205e
nicer error messages
kentosugama Apr 7, 2023
ccd1622
add some file tests
kentosugama Apr 7, 2023
65f18ca
add semantic tests
kentosugama Apr 7, 2023
2fae562
test different optimization levels
kentosugama Apr 10, 2023
a8e62ac
make test cases more complex
kentosugama Apr 10, 2023
a07a95a
test preservation of metadata sections
kentosugama Apr 10, 2023
9df6cbc
Add documentation in readme
kentosugama Apr 10, 2023
21dced7
Update README.md
kentosugama Apr 10, 2023
09d0424
move into shrink and remove test cases
kentosugama Apr 10, 2023
ec44977
merge conflict
kentosugama Apr 10, 2023
b40649c
move tests into shrink test
kentosugama Apr 10, 2023
d9229cd
change error handling to not exit
kentosugama Apr 10, 2023
deec640
remove a reparsing of module
kentosugama Apr 11, 2023
82fcb3d
update tests
kentosugama Apr 11, 2023
da85724
Bump version
kentosugama Apr 11, 2023
c163dcf
inline call to list_metadata
kentosugama Apr 11, 2023
1427f59
remove keep_name_section and rename function
kentosugama Apr 11, 2023
dd0b87c
remove redundant get
kentosugama Apr 11, 2023
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
Prev Previous commit
Next Next commit
make test cases more complex
  • Loading branch information
kentosugama committed Apr 10, 2023
commit a8e62acb1de5c277ddcec2c6ad754f9adeb2b55f
32 changes: 28 additions & 4 deletions tests/deployable.ic-repl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ function motoko(wasm) {
call S.inc();
call S.get();
assert _ == (43 : nat);

call S.inc();
call S.inc();
call S.get();
call S.get();
assert _ == (45 : nat);
S
};
function rust(wasm) {
Expand All @@ -29,6 +35,12 @@ function rust(wasm) {
call S.inc();
call S.read();
assert _ == (43 : nat);

call S.inc();
call S.inc();
call S.read();
call S.read();
assert _ == (45 : nat);
S
};
function wat(wasm) {
Expand All @@ -37,6 +49,12 @@ function wat(wasm) {
call S.inc();
call S.get();
assert _ == (43 : int64);

call S.inc();
call S.inc();
call S.get();
call S.get();
assert _ == (45 : int64);
S
};
function classes(wasm) {
Expand All @@ -46,6 +64,12 @@ function classes(wasm) {
call S.put(42, "text");
call S.get(42);
assert _ == opt "text";

call S.put(40, "text0");
call S.put(41, "text1");
call S.put(42, "text2");
call S.get(42);
assert _ == opt "text2";
S
};
function classes_limit(wasm) {
Expand All @@ -67,22 +91,22 @@ function classes_redirect(wasm) {

let S = motoko(file("ok/motoko-instrument.wasm"));
call S.__get_cycles();
assert _ == (7199 : int64);
assert _ == (9003 : int64);
let S = motoko(file("ok/motoko-gc-instrument.wasm"));
call S.__get_cycles();
assert _ == (177 : int64);
assert _ == (295 : int64);
motoko(file("ok/motoko-shrink.wasm"));
motoko(file("ok/motoko-limit.wasm"));

let S = rust(file("ok/rust-instrument.wasm"));
call S.__get_cycles();
assert _ == (66016 : int64);
assert _ == (136378 : int64);
rust(file("ok/rust-shrink.wasm"));
rust(file("ok/rust-limit.wasm"));

let S = wat(file("ok/wat-instrument.wasm"));
call S.__get_cycles();
assert _ == (121 : int64);
assert _ == (189 : int64);
wat(file("ok/wat-shrink.wasm"));
wat(file("ok/wat-limit.wasm"));

Expand Down