Skip to content

Commit

Permalink
Adds test proving #6858 is fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
esdrubal committed Feb 6, 2025
1 parent 0b6370a commit 447a6e9
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[[package]]
name = "asset_id_into_bytes"
source = "member"
dependencies = ["std"]

[[package]]
name = "core"
source = "path+from-root-F9E4FAEF7F341E13"

[[package]]
name = "std"
source = "path+from-root-F9E4FAEF7F341E13"
dependencies = ["core"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[project]
authors = ["Fuel Labs <[email protected]>"]
entry = "main.sw"
license = "Apache-2.0"
name = "asset_id_into_bytes"

[dependencies]
std = { path = "../../../../../../../sway-lib-std" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
script;

fn main() -> bool {
use std::bytes::Bytes;

let my_asset = AssetId::zero();
let my_bytes: Bytes = my_asset.into();

true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
category = "run"
expected_result = { action = "return", value = 1 }
expected_result_new_encoding = { action = "return_data", value = "01" }
validate_abi = false
expected_warnings = 1

0 comments on commit 447a6e9

Please sign in to comment.