public void Test_total_grains()
    {
        System.Console.WriteLine(Grains.Square(1));
        System.Console.WriteLine(Grains.Square(2));
        System.Console.WriteLine(Grains.Square(3));

        System.Console.WriteLine(Grains.Square(4));
        System.Console.WriteLine(Grains.Square(5));
        Assert.That(Grains.Total(), Is.EqualTo(18446744073709551615));
    }
Exemple #2
0
 public void Test_square_16()
 {
     Assert.Equal(32768ul, Grains.Square(16));
 }
Exemple #3
0
 public void Test_square_64()
 {
     Assert.That(Grains.Square(64), Is.EqualTo(9223372036854775808));
 }
Exemple #4
0
 public void Test_square_16()
 {
     Assert.That(Grains.Square(16), Is.EqualTo(32768));
 }
Exemple #5
0
 public void Test_square_3()
 {
     Assert.That(Grains.Square(3), Is.EqualTo(4));
 }
Exemple #6
0
 public void Square_greater_than_64_raises_an_exception()
 {
     Assert.Throws <ArgumentOutOfRangeException>(() => Grains.Square(65));
 }
Exemple #7
0
 public void Negative_square_raises_an_exception()
 {
     Assert.Throws <ArgumentOutOfRangeException>(() => Grains.Square(-1));
 }
Exemple #8
0
 public void Grains_on_square_64()
 {
     Assert.Equal(9223372036854775808UL, Grains.Square(64));
 }
Exemple #9
0
 public void Number_3()
 {
     Assert.Equal(4UL, Grains.Square(3));
 }
Exemple #10
0
 public void Number_2()
 {
     Assert.Equal(2UL, Grains.Square(2));
 }
Exemple #11
0
 public void Number_1()
 {
     Assert.Equal(1UL, Grains.Square(1));
 }
Exemple #12
0
 public void Test_square_1()
 {
     Assert.Equal(1ul, Grains.Square(1));
 }
Exemple #13
0
 public void Test_square_64()
 {
     Assert.Equal(9223372036854775808ul, Grains.Square(64));
 }
Exemple #14
0
 public void Test_square_32()
 {
     Assert.Equal(2147483648ul, Grains.Square(32));
 }
Exemple #15
0
 public void Grains_on_square_16()
 {
     Assert.Equal(32768UL, Grains.Square(16));
 }
Exemple #16
0
 public void Number_4()
 {
     Assert.Equal(8UL, Grains.Square(4));
 }
Exemple #17
0
 public void Grains_on_square_32()
 {
     Assert.Equal(2147483648UL, Grains.Square(32));
 }
Exemple #18
0
 public void Number_16()
 {
     Assert.Equal(32768UL, Grains.Square(16));
 }
Exemple #19
0
 public void Square_0_raises_an_exception()
 {
     Assert.Throws <ArgumentOutOfRangeException>(() => Grains.Square(0));
 }
Exemple #20
0
 public void Number_32()
 {
     Assert.Equal(2147483648UL, Grains.Square(32));
 }
Exemple #21
0
 public void Grains_on_square_1()
 {
     Assert.Equal(1UL, Grains.Square(1));
 }
Exemple #22
0
 public void Number_64()
 {
     Assert.Equal(9223372036854775808UL, Grains.Square(64));
 }
Exemple #23
0
 public void Test_square_2()
 {
     Assert.That(Grains.Square(2), Is.EqualTo(2));
 }
Exemple #24
0
 public void Grains_on_square_2()
 {
     Assert.Equal(2UL, Grains.Square(2));
 }
Exemple #25
0
 public void Test_square_4()
 {
     Assert.That(Grains.Square(4), Is.EqualTo(8));
 }
Exemple #26
0
 public void Grains_on_square_3()
 {
     Assert.Equal(4UL, Grains.Square(3));
 }
Exemple #27
0
 public void Test_square_32()
 {
     Assert.That(Grains.Square(32), Is.EqualTo(2147483648));
 }
Exemple #28
0
 public void Grains_on_square_4()
 {
     Assert.Equal(8UL, Grains.Square(4));
 }
Exemple #29
0
 public void Test_square_1()
 {
     Assert.That(Grains.Square(1), Is.EqualTo(1));
 }
Exemple #30
0
 public void Test_square_4()
 {
     Assert.Equal(8ul, Grains.Square(4));
 }