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

92 lines
1.2 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_fail, IntegerTester},
2020-07-16 07:55:45 +03:00
parse_program,
};
use leo_inputs::types::{I16Type, IntegerType};
use leo_types::InputValue;
2020-07-31 02:20:31 +03:00
test_int!(Testi16, i16, IntegerType::I16Type(I16Type {}), Int16);
2020-07-16 07:55:45 +03:00
2020-07-31 02:20:31 +03:00
#[test]
fn test_i16_min() {
Testi16::test_min();
2020-07-16 07:55:45 +03:00
}
#[test]
2020-07-31 02:20:31 +03:00
fn test_i16_min_fail() {
Testi16::test_min_fail();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i16_max() {
2020-07-31 02:20:31 +03:00
Testi16::test_max();
2020-07-16 07:55:45 +03:00
}
#[test]
2020-07-31 02:20:31 +03:00
fn test_i16_max_fail() {
Testi16::test_max_fail();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i16_add() {
2020-07-31 02:20:31 +03:00
Testi16::test_add();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i16_sub() {
2020-07-31 02:20:31 +03:00
Testi16::test_sub();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i16_mul() {
2020-07-31 02:20:31 +03:00
Testi16::test_mul();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i16_div() {
2020-07-31 02:20:31 +03:00
Testi16::test_div();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i16_pow() {
2020-07-31 02:20:31 +03:00
Testi16::test_pow();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i16_eq() {
2020-07-31 02:20:31 +03:00
Testi16::test_eq();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i16_ge() {
2020-07-31 02:20:31 +03:00
Testi16::test_ge();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i16_gt() {
2020-07-31 02:20:31 +03:00
Testi16::test_gt();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i16_le() {
2020-07-31 02:20:31 +03:00
Testi16::test_le();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i16_lt() {
2020-07-31 02:20:31 +03:00
Testi16::test_lt();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i16_assert_eq() {
2020-07-31 02:20:31 +03:00
Testi16::test_assert_eq();
2020-07-16 07:55:45 +03:00
}
#[test]
fn test_i16_ternary() {
2020-07-31 02:20:31 +03:00
Testi16::test_ternary();
2020-07-16 07:55:45 +03:00
}