From 325302b065a4651990569ea26d7e5ae39d7e33ab Mon Sep 17 00:00:00 2001 From: Nordine Bittich Date: Sat, 30 Sep 2023 23:31:39 +0200 Subject: [PATCH] autocommit --- Cargo.lock | 2 +- src/adana_script/tests/bitwise.rs | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index b51c8f0..c4aef3c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -28,7 +28,7 @@ dependencies = [ [[package]] name = "adana-script-core" version = "0.14.2" -source = "git+https://github.com/nbittich/adana-script-core.git?branch=feature/bitwise-and-new-ints#ad909c340a9b3bf3c7a4c80b60f1434a78e5fe4a" +source = "git+https://github.com/nbittich/adana-script-core.git?branch=feature/bitwise-and-new-ints#f47d17bf31ba617c674ecfdab2b3ad33b7019d70" dependencies = [ "anyhow", "libloading", diff --git a/src/adana_script/tests/bitwise.rs b/src/adana_script/tests/bitwise.rs index 088725c..9fc590d 100644 --- a/src/adana_script/tests/bitwise.rs +++ b/src/adana_script/tests/bitwise.rs @@ -47,3 +47,11 @@ fn bitwise_xor_test() { let r = compute(r#"-98$1"#, &mut ctx, "N/A").unwrap(); assert_eq!(r, Primitive::I8(-97)); } + +#[test] +fn bitwise_not() { + let mut ctx = BTreeMap::new(); + + let r = compute(r#"~255"#, &mut ctx, "N/A").unwrap(); + assert_eq!(r, Primitive::Int(-256)); +}