about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2020-09-16 08:24:52 +0200
committerGitHub <noreply@github.com>2020-09-16 08:24:52 +0200
commitc1a74a3c28e15d8697cf0bebd8fd1e60b7b0fba4 (patch)
tree9d6d7934c67c707f9f613e01ed9635a7347b4da2 /src/test
parent22dd07d5556eec3e3f98d490827720e45fa27c64 (diff)
parentdc37b553accd4fb2f8d0c59f69c701b524361cc2 (diff)
downloadrust-c1a74a3c28e15d8697cf0bebd8fd1e60b7b0fba4.tar.gz
rust-c1a74a3c28e15d8697cf0bebd8fd1e60b7b0fba4.zip
Rollup merge of #76366 - ayushmishra2005:arith_tests_in_library, r=jyn514
Add Arith Tests in Library

Added Arith Tests library as a part of #76268

r? @matklad
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/numbers-arithmetic/arith-0.rs8
-rw-r--r--src/test/ui/numbers-arithmetic/arith-1.rs24
-rw-r--r--src/test/ui/numbers-arithmetic/arith-2.rs9
3 files changed, 0 insertions, 41 deletions
diff --git a/src/test/ui/numbers-arithmetic/arith-0.rs b/src/test/ui/numbers-arithmetic/arith-0.rs
deleted file mode 100644
index 7943cb908d1..00000000000
--- a/src/test/ui/numbers-arithmetic/arith-0.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-// run-pass
-
-
-pub fn main() {
-    let a: isize = 10;
-    println!("{}", a);
-    assert_eq!(a * (a - 1), 90);
-}
diff --git a/src/test/ui/numbers-arithmetic/arith-1.rs b/src/test/ui/numbers-arithmetic/arith-1.rs
deleted file mode 100644
index c13c8d8b765..00000000000
--- a/src/test/ui/numbers-arithmetic/arith-1.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// run-pass
-
-
-pub fn main() {
-    let i32_a: isize = 10;
-    assert_eq!(i32_a, 10);
-    assert_eq!(i32_a - 10, 0);
-    assert_eq!(i32_a / 10, 1);
-    assert_eq!(i32_a - 20, -10);
-    assert_eq!(i32_a << 10, 10240);
-    assert_eq!(i32_a << 16, 655360);
-    assert_eq!(i32_a * 16, 160);
-    assert_eq!(i32_a * i32_a * i32_a, 1000);
-    assert_eq!(i32_a * i32_a * i32_a * i32_a, 10000);
-    assert_eq!(i32_a * i32_a / i32_a * i32_a, 100);
-    assert_eq!(i32_a * (i32_a - 1) << (2 + i32_a as usize), 368640);
-    let i32_b: isize = 0x10101010;
-    assert_eq!(i32_b + 1 - 1, i32_b);
-    assert_eq!(i32_b << 1, i32_b << 1);
-    assert_eq!(i32_b >> 1, i32_b >> 1);
-    assert_eq!(i32_b & i32_b << 1, 0);
-    println!("{}", i32_b | i32_b << 1);
-    assert_eq!(i32_b | i32_b << 1, 0x30303030);
-}
diff --git a/src/test/ui/numbers-arithmetic/arith-2.rs b/src/test/ui/numbers-arithmetic/arith-2.rs
deleted file mode 100644
index 46c280677ce..00000000000
--- a/src/test/ui/numbers-arithmetic/arith-2.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// run-pass
-
-
-
-pub fn main() {
-    let i32_c: isize = 0x10101010;
-    assert_eq!(i32_c + i32_c * 2 / 3 * 2 + (i32_c - 7 % 3),
-                 i32_c + i32_c * 2 / 3 * 2 + (i32_c - 7 % 3));
-}