From 6d468ece96c1e89f73828369be907d17513b455f Mon Sep 17 00:00:00 2001 From: Federico I Date: Sun, 15 Mar 2020 00:33:33 +0000 Subject: [rust] Raindrops --- raindrops/tests/raindrops.rs | 96 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 raindrops/tests/raindrops.rs (limited to 'raindrops/tests/raindrops.rs') diff --git a/raindrops/tests/raindrops.rs b/raindrops/tests/raindrops.rs new file mode 100644 index 0000000..000c639 --- /dev/null +++ b/raindrops/tests/raindrops.rs @@ -0,0 +1,96 @@ +use raindrops; + +#[test] +fn test_1() { + assert_eq!("1", raindrops::raindrops(1)); +} + +#[test] +fn test_3() { + assert_eq!("Pling", raindrops::raindrops(3)); +} + +#[test] +fn test_5() { + assert_eq!("Plang", raindrops::raindrops(5)); +} + +#[test] +fn test_7() { + assert_eq!("Plong", raindrops::raindrops(7)); +} + +#[test] +fn test_6() { + assert_eq!("Pling", raindrops::raindrops(6)); +} + +#[test] +fn test_8() { + assert_eq!("8", raindrops::raindrops(8)); +} + +#[test] +fn test_9() { + assert_eq!("Pling", raindrops::raindrops(9)); +} + +#[test] +fn test_10() { + assert_eq!("Plang", raindrops::raindrops(10)); +} + +#[test] +fn test_14() { + assert_eq!("Plong", raindrops::raindrops(14)); +} + +#[test] +fn test_15() { + assert_eq!("PlingPlang", raindrops::raindrops(15)); +} + +#[test] +fn test_21() { + assert_eq!("PlingPlong", raindrops::raindrops(21)); +} + +#[test] +fn test_25() { + assert_eq!("Plang", raindrops::raindrops(25)); +} + +#[test] +fn test_27() { + assert_eq!("Pling", raindrops::raindrops(27)); +} + +#[test] +fn test_35() { + assert_eq!("PlangPlong", raindrops::raindrops(35)); +} + +#[test] +fn test_49() { + assert_eq!("Plong", raindrops::raindrops(49)); +} + +#[test] +fn test_52() { + assert_eq!("52", raindrops::raindrops(52)); +} + +#[test] +fn test_105() { + assert_eq!("PlingPlangPlong", raindrops::raindrops(105)); +} + +#[test] +fn test_3125() { + assert_eq!("Plang", raindrops::raindrops(3125)); +} + +#[test] +fn test_12121() { + assert_eq!("12121", raindrops::raindrops(12_121)); +} -- cgit v1.2.3