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

98 lines
1.4 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,
2020-08-01 05:39:30 +03:00
generate_main_input,
integers::{expect_computation_error, expect_parsing_error, IntegerTester},
2020-07-16 07:55:45 +03:00
parse_program,
};
use leo_input::types::{I128Type, IntegerType, SignedIntegerType};
2020-08-03 06:56:22 +03:00
use leo_typed::InputValue;
2020-07-16 07:55:45 +03:00
test_int!(
TestI128,
i128,
IntegerType::Signed(SignedIntegerType::I128Type(I128Type {})),
Int128
);
2020-07-16 07:55:45 +03:00
2020-07-31 02:20:31 +03:00
#[test]
fn test_i128_min() {
TestI128::test_min();
2020-07-16 07:55:45 +03:00
}
#[test]
2020-07-31 02:20:31 +03:00
fn test_i128_min_fail() {
TestI128::test_min_fail();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i128_max() {
TestI128::test_max();
2020-07-16 07:55:45 +03:00
}
#[test]
2020-07-31 02:20:31 +03:00
fn test_i128_max_fail() {
TestI128::test_max_fail();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i128_add() {
TestI128::test_add();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i128_sub() {
TestI128::test_sub();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i128_mul() {
TestI128::test_mul();
2020-07-16 07:55:45 +03:00
}
#[test]
2020-07-31 02:20:31 +03:00
#[ignore] // takes several minutes
2020-07-16 07:55:45 +03:00
fn test_i128_div() {
TestI128::test_div();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i128_pow() {
TestI128::test_pow();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i128_eq() {
TestI128::test_eq();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i128_ge() {
TestI128::test_ge();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i128_gt() {
TestI128::test_gt();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i128_le() {
TestI128::test_le();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i128_lt() {
TestI128::test_lt();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i128_assert_eq() {
TestI128::test_assert_eq();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i128_ternary() {
TestI128::test_ternary();
2020-07-16 07:55:45 +03:00
}