@@ -11,49 +11,87 @@ public void Zero_rows()
1111 [ Fact ( Skip = "Remove this Skip property to run this test" ) ]
1212 public void Single_row ( )
1313 {
14- int [ ] [ ] expected = [ [ 1 ] ] ;
14+ int [ ] [ ] expected = [
15+ [ 1 ]
16+ ] ;
1517 Assert . Equal ( expected , PascalsTriangle . Calculate ( 1 ) ) ;
1618 }
1719
1820 [ Fact ( Skip = "Remove this Skip property to run this test" ) ]
1921 public void Two_rows ( )
2022 {
21- int [ ] [ ] expected = [ [ 1 ] , [ 1 , 1 ] ] ;
23+ int [ ] [ ] expected = [
24+ [ 1 ] ,
25+ [ 1 , 1 ]
26+ ] ;
2227 Assert . Equal ( expected , PascalsTriangle . Calculate ( 2 ) ) ;
2328 }
2429
2530 [ Fact ( Skip = "Remove this Skip property to run this test" ) ]
2631 public void Three_rows ( )
2732 {
28- int [ ] [ ] expected = [ [ 1 ] , [ 1 , 1 ] , [ 1 , 2 , 1 ] ] ;
33+ int [ ] [ ] expected = [
34+ [ 1 ] ,
35+ [ 1 , 1 ] ,
36+ [ 1 , 2 , 1 ]
37+ ] ;
2938 Assert . Equal ( expected , PascalsTriangle . Calculate ( 3 ) ) ;
3039 }
3140
3241 [ Fact ( Skip = "Remove this Skip property to run this test" ) ]
3342 public void Four_rows ( )
3443 {
35- int [ ] [ ] expected = [ [ 1 ] , [ 1 , 1 ] , [ 1 , 2 , 1 ] , [ 1 , 3 , 3 , 1 ] ] ;
44+ int [ ] [ ] expected = [
45+ [ 1 ] ,
46+ [ 1 , 1 ] ,
47+ [ 1 , 2 , 1 ] ,
48+ [ 1 , 3 , 3 , 1 ]
49+ ] ;
3650 Assert . Equal ( expected , PascalsTriangle . Calculate ( 4 ) ) ;
3751 }
3852
3953 [ Fact ( Skip = "Remove this Skip property to run this test" ) ]
4054 public void Five_rows ( )
4155 {
42- int [ ] [ ] expected = [ [ 1 ] , [ 1 , 1 ] , [ 1 , 2 , 1 ] , [ 1 , 3 , 3 , 1 ] , [ 1 , 4 , 6 , 4 , 1 ] ] ;
56+ int [ ] [ ] expected = [
57+ [ 1 ] ,
58+ [ 1 , 1 ] ,
59+ [ 1 , 2 , 1 ] ,
60+ [ 1 , 3 , 3 , 1 ] ,
61+ [ 1 , 4 , 6 , 4 , 1 ]
62+ ] ;
4363 Assert . Equal ( expected , PascalsTriangle . Calculate ( 5 ) ) ;
4464 }
4565
4666 [ Fact ( Skip = "Remove this Skip property to run this test" ) ]
4767 public void Six_rows ( )
4868 {
49- int [ ] [ ] expected = [ [ 1 ] , [ 1 , 1 ] , [ 1 , 2 , 1 ] , [ 1 , 3 , 3 , 1 ] , [ 1 , 4 , 6 , 4 , 1 ] , [ 1 , 5 , 10 , 10 , 5 , 1 ] ] ;
69+ int [ ] [ ] expected = [
70+ [ 1 ] ,
71+ [ 1 , 1 ] ,
72+ [ 1 , 2 , 1 ] ,
73+ [ 1 , 3 , 3 , 1 ] ,
74+ [ 1 , 4 , 6 , 4 , 1 ] ,
75+ [ 1 , 5 , 10 , 10 , 5 , 1 ]
76+ ] ;
5077 Assert . Equal ( expected , PascalsTriangle . Calculate ( 6 ) ) ;
5178 }
5279
5380 [ Fact ( Skip = "Remove this Skip property to run this test" ) ]
5481 public void Ten_rows ( )
5582 {
56- int [ ] [ ] expected = [ [ 1 ] , [ 1 , 1 ] , [ 1 , 2 , 1 ] , [ 1 , 3 , 3 , 1 ] , [ 1 , 4 , 6 , 4 , 1 ] , [ 1 , 5 , 10 , 10 , 5 , 1 ] , [ 1 , 6 , 15 , 20 , 15 , 6 , 1 ] , [ 1 , 7 , 21 , 35 , 35 , 21 , 7 , 1 ] , [ 1 , 8 , 28 , 56 , 70 , 56 , 28 , 8 , 1 ] , [ 1 , 9 , 36 , 84 , 126 , 126 , 84 , 36 , 9 , 1 ] ] ;
83+ int [ ] [ ] expected = [
84+ [ 1 ] ,
85+ [ 1 , 1 ] ,
86+ [ 1 , 2 , 1 ] ,
87+ [ 1 , 3 , 3 , 1 ] ,
88+ [ 1 , 4 , 6 , 4 , 1 ] ,
89+ [ 1 , 5 , 10 , 10 , 5 , 1 ] ,
90+ [ 1 , 6 , 15 , 20 , 15 , 6 , 1 ] ,
91+ [ 1 , 7 , 21 , 35 , 35 , 21 , 7 , 1 ] ,
92+ [ 1 , 8 , 28 , 56 , 70 , 56 , 28 , 8 , 1 ] ,
93+ [ 1 , 9 , 36 , 84 , 126 , 126 , 84 , 36 , 9 , 1 ]
94+ ] ;
5795 Assert . Equal ( expected , PascalsTriangle . Calculate ( 10 ) ) ;
5896 }
5997}
0 commit comments