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

117 lines
1.5 KiB
Rust
Raw Normal View History

2020-07-16 06:42:57 +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 06:42:57 +03:00
parse_program,
};
use leo_input::types::{I8Type, IntegerType, SignedIntegerType};
2020-08-03 06:56:22 +03:00
use leo_typed::InputValue;
2020-07-16 06:42:57 +03:00
test_int!(
TestI8,
i8,
IntegerType::Signed(SignedIntegerType::I8Type(I8Type {})),
Int8
);
2020-07-16 06:42:57 +03:00
2020-07-31 02:20:31 +03:00
#[test]
fn test_i8_min() {
TestI8::test_min();
2020-07-16 06:42:57 +03:00
}
#[test]
2020-07-31 02:20:31 +03:00
fn test_i8_min_fail() {
TestI8::test_min_fail();
2020-07-16 06:42:57 +03:00
}
#[test]
fn test_i8_max() {
TestI8::test_max();
2020-07-16 06:42:57 +03:00
}
#[test]
2020-07-31 02:20:31 +03:00
fn test_i8_max_fail() {
TestI8::test_max_fail();
2020-07-16 06:42:57 +03:00
}
2020-08-05 07:37:09 +03:00
#[test]
fn test_i8_neg() {
2020-08-06 06:06:33 +03:00
TestI8::test_negate();
2020-08-05 07:37:09 +03:00
}
#[test]
fn test_i8_neg_max_fail() {
2020-08-06 06:06:33 +03:00
TestI8::test_negate_min_fail();
2020-08-05 07:37:09 +03:00
}
#[test]
fn test_i8_neg_zero() {
2020-08-06 06:06:33 +03:00
TestI8::test_negate_zero();
2020-08-05 07:37:09 +03:00
}
2020-07-16 06:42:57 +03:00
#[test]
fn test_i8_add() {
TestI8::test_add();
2020-07-16 06:42:57 +03:00
}
#[test]
fn test_i8_sub() {
TestI8::test_sub();
2020-07-16 06:42:57 +03:00
}
#[test]
fn test_i8_mul() {
TestI8::test_mul();
2020-07-16 06:42:57 +03:00
}
#[test]
fn test_i8_div() {
TestI8::test_div();
2020-07-16 06:42:57 +03:00
}
#[test]
fn test_i8_pow() {
TestI8::test_pow();
2020-07-16 06:42:57 +03:00
}
#[test]
fn test_i8_eq() {
TestI8::test_eq();
2020-07-16 06:42:57 +03:00
}
2020-08-14 10:25:39 +03:00
#[test]
fn test_i8_ne() {
TestI8::test_ne();
}
2020-07-16 06:42:57 +03:00
#[test]
fn test_i8_ge() {
TestI8::test_ge();
2020-07-16 06:42:57 +03:00
}
#[test]
fn test_i8_gt() {
TestI8::test_gt();
2020-07-16 06:42:57 +03:00
}
#[test]
fn test_i8_le() {
TestI8::test_le();
2020-07-16 06:42:57 +03:00
}
#[test]
fn test_i8_lt() {
TestI8::test_lt();
2020-07-16 06:42:57 +03:00
}
#[test]
fn test_i8_assert_eq() {
TestI8::test_assert_eq();
2020-07-16 06:42:57 +03:00
}
#[test]
fn test_i8_ternary() {
TestI8::test_ternary();
2020-07-16 06:42:57 +03:00
}