Skip to content

Commit f95de10

Browse files
authored
Merge pull request CosmWasm#1212 from CosmWasm/floaty-integration
Add integration test for floaty
2 parents 66b9877 + 634a197 commit f95de10

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

.circleci/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,9 @@ jobs:
546546
- run:
547547
name: Unit tests
548548
command: cargo unit-test --locked
549+
- run:
550+
name: Integration tests (singlepass backend)
551+
command: cargo integration-test --locked --no-default-features
549552
- run:
550553
name: Build and run schema generator
551554
command: cargo schema --locked

contracts/floaty/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ thiserror = "1.0"
3939
[dev-dependencies]
4040
cosmwasm-schema = { path = "../../packages/schema" }
4141
cosmwasm-storage = { path = "../../packages/storage" }
42-
cosmwasm-vm = { path = "../../packages/vm", default-features = false }
42+
cosmwasm-vm = { path = "../../packages/vm", default-features = false, features = ["iterator"] }

contracts/floaty/tests/integration.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
use cosmwasm_vm::testing::mock_instance;
2+
3+
// This line will test the output of cargo wasm
4+
static WASM: &[u8] = include_bytes!("../target/wasm32-unknown-unknown/release/floaty.wasm");
5+
// You can uncomment this line instead to test productionified build from rust-optimizer
6+
// static WASM: &[u8] = include_bytes!("../contract.wasm");
7+
8+
#[test]
9+
#[should_panic(expected = "Float operator detected")]
10+
fn instantiate_fails() {
11+
let mut _deps = mock_instance(WASM, &[]);
12+
}

0 commit comments

Comments
 (0)