Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

Commit 1190808

Browse files
achimccAchim Schneider
authored andcommitted
reference flipper contract for test
1 parent 2049979 commit 1190808

File tree

2 files changed

+3
-74
lines changed

2 files changed

+3
-74
lines changed

crates/sandbox/src/example_code.rs

Lines changed: 0 additions & 73 deletions
This file was deleted.

crates/sandbox/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
mod build_command;
2222
mod docker_command;
2323
mod example_code;
24+
const EXAMPLE_CODE_PATH: &str = "../../contract/lib.rs";
25+
2426

2527
use crate::build_command::{
2628
build_compile_command,
@@ -375,7 +377,6 @@ fn vec_to_str(v: Vec<u8>) -> Result<String> {
375377
#[cfg(test)]
376378
mod tests {
377379
use super::*;
378-
use crate::example_code::tests::FLIPPER_CODE;
379380

380381
fn compile_check(source: String) -> Option<bool> {
381382
Sandbox::new()
@@ -398,6 +399,7 @@ mod tests {
398399

399400
#[test]
400401
fn test_compile_valid_code() {
402+
let FLIPPER_CODE = include_str!(EXAMPLE_CODE_PATH);
401403
let actual_result = compile_check(FLIPPER_CODE.to_string());
402404

403405
assert_eq!(actual_result, Some(true))

0 commit comments

Comments
 (0)