mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-24 07:48:04 +03:00
Merge pull request #351 from AleoHQ/feature/log-numbers
remove types from console.log and formatted strings
This commit is contained in:
commit
7dfbff7795
@ -60,7 +60,7 @@ impl fmt::Display for Integer {
|
||||
let integer = self;
|
||||
let option = match_integer!(integer => integer.get_value());
|
||||
match option {
|
||||
Some(number) => write!(f, "{}{}", number, self.get_type()),
|
||||
Some(number) => write!(f, "{}", number),
|
||||
None => write!(f, "[input]{}", self.get_type()),
|
||||
}
|
||||
}
|
||||
|
@ -334,9 +334,9 @@ impl<F: Field + PrimeField, G: GroupType<F>> fmt::Display for ConstrainedValue<F
|
||||
write!(f, "function {{ {}() }}", function.identifier)
|
||||
}
|
||||
ConstrainedValue::Import(_, ref value) => write!(f, "{}", value),
|
||||
ConstrainedValue::Mutable(ref value) => write!(f, "mut {}", value),
|
||||
ConstrainedValue::Static(ref value) => write!(f, "static {}", value),
|
||||
ConstrainedValue::Unresolved(ref value) => write!(f, "unresolved {}", value),
|
||||
ConstrainedValue::Mutable(ref value) => write!(f, "{}", value),
|
||||
ConstrainedValue::Static(ref value) => write!(f, "{}", value),
|
||||
ConstrainedValue::Unresolved(ref value) => write!(f, "{}", value),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,2 +1,2 @@
|
||||
[registers]
|
||||
r: [u8; (3)] = [1u8, 1u8, 1u8];
|
||||
r: [u8; (3)] = [1, 1, 1];
|
||||
|
@ -1,2 +1,2 @@
|
||||
[registers]
|
||||
r: [u8; (3)] = [0u8, 0u8, 0u8];
|
||||
r: [u8; (3)] = [0, 0, 0];
|
||||
|
@ -1,3 +1,3 @@
|
||||
[registers]
|
||||
a: u32 = 0u32;
|
||||
b: u32 = 0u32;
|
||||
a: u32 = 0;
|
||||
b: u32 = 0;
|
||||
|
@ -190,14 +190,14 @@ fn test_nested() {
|
||||
}
|
||||
|
||||
fn output_one(program: EdwardsTestCompiler) {
|
||||
let expected = include_bytes!("output_/registers_one.out");
|
||||
let expected = include_bytes!("output/registers_one.out");
|
||||
let actual = get_output(program);
|
||||
|
||||
assert_eq!(expected, actual.bytes().as_slice());
|
||||
}
|
||||
|
||||
fn output_zero(program: EdwardsTestCompiler) {
|
||||
let expected = include_bytes!("output_/registers_zero.out");
|
||||
let expected = include_bytes!("output/registers_zero.out");
|
||||
let actual = get_output(program);
|
||||
|
||||
assert_eq!(expected, actual.bytes().as_slice());
|
||||
|
@ -0,0 +1,2 @@
|
||||
[registers]
|
||||
a: u32 = 1;
|
@ -0,0 +1,2 @@
|
||||
[registers]
|
||||
a: u32 = 0;
|
@ -1,2 +0,0 @@
|
||||
[registers]
|
||||
a: u32 = 1u32;
|
@ -1,2 +0,0 @@
|
||||
[registers]
|
||||
a: u32 = 0u32;
|
Loading…
Reference in New Issue
Block a user