Fix tests and cli

This commit is contained in:
Wei Tang 2018-06-29 19:06:33 +08:00
parent d6f82000ee
commit af2d61b9f8
4 changed files with 23 additions and 23 deletions

View File

@ -34,7 +34,7 @@ name = "wasm-pack"
path = "pack/main.rs"
[dependencies]
parity-wasm = "0.30"
parity-wasm = "0.31"
pwasm-utils = { path = "..", version = "0.2" }
glob = "0.2"
clap = "2.24"

View File

@ -271,7 +271,7 @@ mod tests {
#[test]
fn simple_grow() {
use parity_wasm::elements::Opcode::*;
use parity_wasm::elements::Instruction::*;
let module = builder::module()
.global()
@ -280,7 +280,7 @@ mod tests {
.function()
.signature().param().i32().build()
.body()
.with_opcodes(elements::Opcodes::new(
.with_instructions(elements::Instructions::new(
vec![
GetGlobal(0),
GrowMemory(0),
@ -326,7 +326,7 @@ mod tests {
#[test]
fn grow_no_gas_no_track() {
use parity_wasm::elements::Opcode::*;
use parity_wasm::elements::Instruction::*;
let module = builder::module()
.global()
@ -335,7 +335,7 @@ mod tests {
.function()
.signature().param().i32().build()
.body()
.with_opcodes(elements::Opcodes::new(
.with_instructions(elements::Instructions::new(
vec![
GetGlobal(0),
GrowMemory(0),
@ -369,7 +369,7 @@ mod tests {
#[test]
fn simple() {
use parity_wasm::elements::Opcode::*;
use parity_wasm::elements::Instruction::*;
let module = builder::module()
.global()
@ -378,7 +378,7 @@ mod tests {
.function()
.signature().param().i32().build()
.body()
.with_opcodes(elements::Opcodes::new(
.with_instructions(elements::Instructions::new(
vec![
GetGlobal(0),
End
@ -405,7 +405,7 @@ mod tests {
#[test]
fn nested() {
use parity_wasm::elements::Opcode::*;
use parity_wasm::elements::Instruction::*;
let module = builder::module()
.global()
@ -414,7 +414,7 @@ mod tests {
.function()
.signature().param().i32().build()
.body()
.with_opcodes(elements::Opcodes::new(
.with_instructions(elements::Instructions::new(
vec![
GetGlobal(0),
Block(elements::BlockType::NoResult),
@ -455,7 +455,7 @@ mod tests {
#[test]
fn ifelse() {
use parity_wasm::elements::Opcode::*;
use parity_wasm::elements::Instruction::*;
let module = builder::module()
.global()
@ -464,7 +464,7 @@ mod tests {
.function()
.signature().param().i32().build()
.body()
.with_opcodes(elements::Opcodes::new(
.with_instructions(elements::Instructions::new(
vec![
GetGlobal(0),
If(elements::BlockType::NoResult),
@ -513,7 +513,7 @@ mod tests {
#[test]
fn call_index() {
use parity_wasm::elements::Opcode::*;
use parity_wasm::elements::Instruction::*;
let module = builder::module()
.global()
@ -526,7 +526,7 @@ mod tests {
.function()
.signature().param().i32().build()
.body()
.with_opcodes(elements::Opcodes::new(
.with_instructions(elements::Instructions::new(
vec![
Call(0),
If(elements::BlockType::NoResult),
@ -576,7 +576,7 @@ mod tests {
#[test]
fn forbidden() {
use parity_wasm::elements::Opcode::*;
use parity_wasm::elements::Instruction::*;
let module = builder::module()
.global()
@ -585,7 +585,7 @@ mod tests {
.function()
.signature().param().i32().build()
.body()
.with_opcodes(elements::Opcodes::new(
.with_instructions(elements::Instructions::new(
vec![
F32Const(555555),
End

View File

@ -435,7 +435,7 @@ mod tests {
.function()
.signature().param().i32().build()
.body()
.with_opcodes(elements::Instructions::new(
.with_instructions(elements::Instructions::new(
vec![
elements::Instruction::GetGlobal(0),
elements::Instruction::End
@ -477,7 +477,7 @@ mod tests {
.function()
.signature().param().i32().build()
.body()
.with_opcodes(elements::Instructions::new(
.with_instructions(elements::Instructions::new(
vec![
elements::Instruction::GetGlobal(1),
elements::Instruction::End
@ -510,7 +510,7 @@ mod tests {
.function()
.signature().param().i32().build()
.body()
.with_opcodes(elements::Instructions::new(
.with_instructions(elements::Instructions::new(
vec![
elements::Instruction::Call(1),
elements::Instruction::End
@ -563,7 +563,7 @@ mod tests {
.function()
.signature().param().i32().build()
.body()
.with_opcodes(elements::Instructions::new(
.with_instructions(elements::Instructions::new(
vec![
elements::Instruction::CallIndirect(1, 0),
elements::Instruction::End

View File

@ -249,7 +249,7 @@ mod test {
.function()
.signature().build()
.body()
.with_opcodes(elements::Instructions::new(
.with_instructions(elements::Instructions::new(
vec![
elements::Instruction::End
]
@ -259,7 +259,7 @@ mod test {
.function()
.signature().build()
.body()
.with_opcodes(elements::Instructions::new(
.with_instructions(elements::Instructions::new(
vec![
elements::Instruction::End
]
@ -298,7 +298,7 @@ mod test {
.function()
.signature().build()
.body()
.with_opcodes(elements::Instructions::new(
.with_instructions(elements::Instructions::new(
vec![
elements::Instruction::End
]
@ -308,7 +308,7 @@ mod test {
.function()
.signature().build()
.body()
.with_opcodes(elements::Instructions::new(
.with_instructions(elements::Instructions::new(
vec![
elements::Instruction::End
]