Merge pull request #351 from AleoHQ/feature/log-numbers

remove types from console.log and formatted strings
This commit is contained in:
Collin Chin 2020-09-18 11:30:12 -07:00 committed by GitHub
commit 7dfbff7795
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 14 additions and 14 deletions

View File

@ -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()),
}
}

View File

@ -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),
}
}
}

View File

@ -1,2 +1,2 @@
[registers]
r: [u8; (3)] = [1u8, 1u8, 1u8];
r: [u8; (3)] = [1, 1, 1];

View File

@ -1,2 +1,2 @@
[registers]
r: [u8; (3)] = [0u8, 0u8, 0u8];
r: [u8; (3)] = [0, 0, 0];

View File

@ -1,3 +1,3 @@
[registers]
a: u32 = 0u32;
b: u32 = 0u32;
a: u32 = 0;
b: u32 = 0;

View File

@ -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());

View File

@ -0,0 +1,2 @@
[registers]
a: u32 = 1;

View File

@ -0,0 +1,2 @@
[registers]
a: u32 = 0;

View File

@ -1,2 +0,0 @@
[registers]
a: u32 = 1u32;

View File

@ -1,2 +0,0 @@
[registers]
a: u32 = 0u32;