leo/compiler/tests/integers/i64/mod.rs

93 lines
1.3 KiB
Rust
Raw Normal View History

2020-07-16 07:55:45 +03:00
use crate::{
2020-07-31 02:20:31 +03:00
assert_satisfied,
expect_synthesis_error,
generate_main_inputs,
integers::{expect_computation_error, expect_parsing_error, IntegerTester},
2020-07-16 07:55:45 +03:00
parse_program,
};
2020-08-01 04:49:01 +03:00
use leo_input::types::{I64Type, IntegerType};
2020-07-16 07:55:45 +03:00
use leo_types::InputValue;
2020-07-31 02:20:31 +03:00
test_int!(Testi64, i64, IntegerType::I64Type(I64Type {}), Int64);
2020-07-16 07:55:45 +03:00
2020-07-31 02:20:31 +03:00
#[test]
fn test_i64_min() {
Testi64::test_min();
2020-07-16 07:55:45 +03:00
}
#[test]
2020-07-31 02:20:31 +03:00
fn test_i64_min_fail() {
Testi64::test_min_fail();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i64_max() {
2020-07-31 02:20:31 +03:00
Testi64::test_max();
2020-07-16 07:55:45 +03:00
}
#[test]
2020-07-31 02:20:31 +03:00
fn test_i64_max_fail() {
Testi64::test_max_fail();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i64_add() {
2020-07-31 02:20:31 +03:00
Testi64::test_add();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i64_sub() {
2020-07-31 02:20:31 +03:00
Testi64::test_sub();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i64_mul() {
2020-07-31 02:20:31 +03:00
Testi64::test_mul();
2020-07-16 07:55:45 +03:00
}
#[test]
2020-07-31 04:30:56 +03:00
#[ignore] // takes 2 minutes
2020-07-16 07:55:45 +03:00
fn test_i64_div() {
2020-07-31 02:20:31 +03:00
Testi64::test_div();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i64_pow() {
2020-07-31 02:20:31 +03:00
Testi64::test_pow();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i64_eq() {
2020-07-31 02:20:31 +03:00
Testi64::test_eq();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i64_ge() {
2020-07-31 02:20:31 +03:00
Testi64::test_ge();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i64_gt() {
2020-07-31 02:20:31 +03:00
Testi64::test_gt();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i64_le() {
2020-07-31 02:20:31 +03:00
Testi64::test_le();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i64_lt() {
2020-07-31 02:20:31 +03:00
Testi64::test_lt();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i64_assert_eq() {
2020-07-31 02:20:31 +03:00
Testi64::test_assert_eq();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i64_ternary() {
2020-07-31 02:20:31 +03:00
Testi64::test_ternary();
2020-07-16 07:55:45 +03:00
}