From 1f435617dabd4a999d3f97a2841a04c40a7f6038 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 21 Oct 2018 11:38:57 +0200 Subject: [PATCH] Re-Enable Simulation dirty-flag test In preparation for refactoring, and exposing the dirty flag we re-enable the dirty flag test on resetMap --- test/simulation_test.dart | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/simulation_test.dart b/test/simulation_test.dart index 1f99ed1..4dc7f5f 100644 --- a/test/simulation_test.dart +++ b/test/simulation_test.dart @@ -27,14 +27,17 @@ void main() { expect(sut.map, isNot(same(oldMap))); }); }); - group("reset", () { - test("returns a map filled with 'false' ", () { - expect(sut.reset(), allOf(TypeMatcher(), isNot(contains(true)))); + group("resetMap", () { + test("sets the internal map filled with 'false' ", () { + sut.map.set(1, 1, true); + sut.reset(); + expect(sut.map, allOf(TypeMatcher(), isNot(contains(true)))); }); test("sets the simulation to need re-rendering", () { + sut.dirty = false; sut.reset(); expect(sut.dirty, true); - }, skip: "can not find a way to set dirty to true first yet"); + }); }); group("save&load", () { test(