mirror of
https://github.com/fluencelabs/parity-wasm
synced 2025-06-25 04:31:57 +00:00
arrange first bunch of tests
This commit is contained in:
@ -1,4 +1,8 @@
|
||||
language: rust
|
||||
script:
|
||||
- cargo build --release --verbose
|
||||
- cargo test --release --verbose
|
||||
- cargo test --release --manifest-path=spec/Cargo.toml
|
||||
after_success: |
|
||||
cargo doc \
|
||||
&& echo '<meta http-equiv=refresh content=0;url=parity_wasm/index.html>' > target/doc/index.html && \
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "parity-wasm-testsuite"
|
||||
version = "0.5.6"
|
||||
version = "0.0.0"
|
||||
authors = ["NikVolf <nikvolf@gmail.com>"]
|
||||
license = "MIT/Apache-2.0"
|
||||
readme = "README.md"
|
||||
|
@ -7,7 +7,4 @@ macro_rules! run_test {
|
||||
);
|
||||
}
|
||||
|
||||
run_test!("br_if", wasm_br_if);
|
||||
run_test!("block", wasm_block);
|
||||
run_test!("i32", wasm_i32);
|
||||
run_test!("address", wasm_address);
|
@ -83,6 +83,7 @@ pub fn spec(name: &str) {
|
||||
};
|
||||
|
||||
for command in spec.commands.iter().skip(1) {
|
||||
println!("command {:?}", command);
|
||||
match command {
|
||||
&test::Command::Module { ref filename, .. } => {
|
||||
let (_new_program, new_module) = setup_program(&outdir, &filename);
|
||||
|
@ -1,20 +1,20 @@
|
||||
#![cfg(test)]
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Deserialize, Debug)]
|
||||
pub struct RuntimeValue {
|
||||
#[serde(rename = "type")]
|
||||
pub value_type: String,
|
||||
pub value: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Deserialize, Debug)]
|
||||
#[serde(tag = "type")]
|
||||
pub enum Action {
|
||||
#[serde(rename = "invoke")]
|
||||
Invoke { field: String, args: Vec<RuntimeValue> }
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Deserialize, Debug)]
|
||||
#[serde(tag = "type")]
|
||||
pub enum Command {
|
||||
#[serde(rename = "module")]
|
||||
@ -33,7 +33,7 @@ pub enum Command {
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Deserialize, Debug)]
|
||||
pub struct Spec {
|
||||
pub source_filename: String,
|
||||
pub commands: Vec<Command>,
|
||||
|
@ -538,7 +538,10 @@ fn f64_from_bits(mut v: u64) -> f64 {
|
||||
macro_rules! impl_integer_arithmetic_ops {
|
||||
($type: ident) => {
|
||||
impl ArithmeticOps<$type> for $type {
|
||||
fn add(self, other: $type) -> $type { self.wrapping_add(other) }
|
||||
fn add(self, other: $type) -> $type {
|
||||
|
||||
self.wrapping_add(other)
|
||||
}
|
||||
fn sub(self, other: $type) -> $type { self.wrapping_sub(other) }
|
||||
fn mul(self, other: $type) -> $type { self.wrapping_mul(other) }
|
||||
fn div(self, other: $type) -> Result<$type, Error> {
|
||||
|
Reference in New Issue
Block a user