Add test case for u128 panic (#5601)

* u128 panic

* Add test case for u128 memory out of bounds error

* Fix check
This commit is contained in:
Justin Starry
2019-08-26 16:31:06 -04:00
committed by GitHub
parent b4935ff4ed
commit bd20c5e791
2 changed files with 10 additions and 0 deletions

View File

@ -8,6 +8,10 @@ pub fn work(x: u128, y: u128) -> u128 {
x + y
}
pub fn two_thirds(x: u128) -> u128 {
2 * x / 3
}
#[cfg(test)]
mod test {
extern crate std;