Sha256: c20636ac1b162dda34f240c8c2f1d69a3f7b1fdcdcce58e0b4deaf776f08ab9a

Contents?: true

Size: 998 Bytes

Versions: 182

Compression:

Stored size: 998 Bytes

Contents

extern crate grains;

#[test]
fn square_one() {
    assert_eq!(grains::square(1), 1);
}

#[test]
#[ignore]
fn square_two() {
    assert_eq!(grains::square(2), 2);
}

#[test]
#[ignore]
fn square_three() {
    assert_eq!(grains::square(3), 4);
}

#[test]
#[ignore]
fn square_four() {
    assert_eq!(grains::square(4), 8);
}

#[test]
#[ignore]
fn square_sixteen() {
    assert_eq!(grains::square(16), 32_768);
}

#[test]
#[ignore]
fn square_thirty_two() {
    assert_eq!(grains::square(32), 2_147_483_648);
}

#[test]
#[ignore]
fn square_sixty_four() {
    assert_eq!(grains::square(64), 9_223_372_036_854_775_808);
}

#[test]
#[ignore]
#[should_panic(expected = "Square must be between 1 and 64")]
fn square_zero_panics() {
    grains::square(0);
}

#[test]
#[ignore]
#[should_panic(expected = "Square must be between 1 and 64")]
fn square_sixty_five_panics() {
    grains::square(65);
}

#[test]
#[ignore]
fn total_sums_all_squares() {
    assert_eq!(grains::total(), 18_446_744_073_709_551_615);
}

Version data entries

182 entries across 182 versions & 1 rubygems

Version Path
trackler-2.2.1.119 tracks/rust/exercises/grains/tests/grains.rs
trackler-2.2.1.118 tracks/rust/exercises/grains/tests/grains.rs
trackler-2.2.1.117 tracks/rust/exercises/grains/tests/grains.rs
trackler-2.2.1.116 tracks/rust/exercises/grains/tests/grains.rs
trackler-2.2.1.115 tracks/rust/exercises/grains/tests/grains.rs
trackler-2.2.1.114 tracks/rust/exercises/grains/tests/grains.rs
trackler-2.2.1.113 tracks/rust/exercises/grains/tests/grains.rs
trackler-2.2.1.111 tracks/rust/exercises/grains/tests/grains.rs
trackler-2.2.1.110 tracks/rust/exercises/grains/tests/grains.rs
trackler-2.2.1.109 tracks/rust/exercises/grains/tests/grains.rs
trackler-2.2.1.108 tracks/rust/exercises/grains/tests/grains.rs
trackler-2.2.1.107 tracks/rust/exercises/grains/tests/grains.rs
trackler-2.2.1.106 tracks/rust/exercises/grains/tests/grains.rs
trackler-2.2.1.105 tracks/rust/exercises/grains/tests/grains.rs
trackler-2.2.1.104 tracks/rust/exercises/grains/tests/grains.rs
trackler-2.2.1.103 tracks/rust/exercises/grains/tests/grains.rs
trackler-2.2.1.102 tracks/rust/exercises/grains/tests/grains.rs
trackler-2.2.1.101 tracks/rust/exercises/grains/tests/grains.rs
trackler-2.2.1.100 tracks/rust/exercises/grains/tests/grains.rs
trackler-2.2.1.99 tracks/rust/exercises/grains/tests/grains.rs