Regroup Instantiation tests
This commit is contained in:
parent
fb481669ed
commit
eef7a23c8f
1 changed files with 38 additions and 34 deletions
|
@ -30,6 +30,7 @@ void main() {
|
||||||
Grid sut = Grid(87, 85);
|
Grid sut = Grid(87, 85);
|
||||||
expect(sut.length, 7395);
|
expect(sut.length, 7395);
|
||||||
}, tags: const ["happy"]);
|
}, tags: const ["happy"]);
|
||||||
|
group(".from", () {
|
||||||
test("copies the content of another grid on .from Constructor call", () {
|
test("copies the content of another grid on .from Constructor call", () {
|
||||||
Grid original = Grid(2, 2);
|
Grid original = Grid(2, 2);
|
||||||
original[0] = "Hey";
|
original[0] = "Hey";
|
||||||
|
@ -50,6 +51,8 @@ void main() {
|
||||||
Grid sut = Grid.from(original);
|
Grid sut = Grid.from(original);
|
||||||
expect(sut.length, 4);
|
expect(sut.length, 4);
|
||||||
}, tags: const ["happy"]);
|
}, tags: const ["happy"]);
|
||||||
|
});
|
||||||
|
group(".fromList", () {
|
||||||
test("sets the length for list passed in on .fromList Constructor call",
|
test("sets the length for list passed in on .fromList Constructor call",
|
||||||
() {
|
() {
|
||||||
Grid sut = Grid.fromList(l, 3);
|
Grid sut = Grid.fromList(l, 3);
|
||||||
|
@ -70,6 +73,7 @@ void main() {
|
||||||
expect(sut.width, 3);
|
expect(sut.width, 3);
|
||||||
}, tags: const ["happy"]);
|
}, tags: const ["happy"]);
|
||||||
});
|
});
|
||||||
|
});
|
||||||
group("toIndex", () {
|
group("toIndex", () {
|
||||||
Grid sut;
|
Grid sut;
|
||||||
setUp(() {
|
setUp(() {
|
||||||
|
|
Loading…
Reference in a new issue