@@ -87,8 +87,9 @@ class _AssetGraphMatcher extends Matcher {
8787 }
8888 if (node.type == NodeType .generated) {
8989 if (expectedNode.type == NodeType .generated) {
90- final configuration = node.generatedNodeConfiguration;
91- final expectedConfiguration = expectedNode.generatedNodeConfiguration;
90+ final configuration = node.generatedNodeConfiguration! ;
91+ final expectedConfiguration =
92+ expectedNode.generatedNodeConfiguration! ;
9293
9394 if (configuration.primaryInput !=
9495 expectedConfiguration.primaryInput) {
@@ -99,8 +100,8 @@ class _AssetGraphMatcher extends Matcher {
99100 matches = false ;
100101 }
101102
102- final state = node.generatedNodeState;
103- final expectedState = expectedNode.generatedNodeState;
103+ final state = node.generatedNodeState! ;
104+ final expectedState = expectedNode.generatedNodeState! ;
104105
105106 if (state.pendingBuildAction != expectedState.pendingBuildAction) {
106107 matchState['pendingBuildAction of ${node .id }' ] = [
@@ -145,8 +146,8 @@ class _AssetGraphMatcher extends Matcher {
145146 }
146147 } else if (node.type == NodeType .glob) {
147148 if (expectedNode.type == NodeType .glob) {
148- final state = node.globNodeState;
149- final expectedState = expectedNode.globNodeState;
149+ final state = node.globNodeState! ;
150+ final expectedState = expectedNode.globNodeState! ;
150151
151152 if (state.pendingBuildAction != expectedState.pendingBuildAction) {
152153 matchState['pendingBuildAction of ${node .id }' ] = [
@@ -166,7 +167,7 @@ class _AssetGraphMatcher extends Matcher {
166167 }
167168
168169 if (! unorderedEquals (
169- state.results! ,
170+ state.results,
170171 ).matches (expectedState.results, {})) {
171172 matchState['results of ${node .id }' ] = [
172173 state.results,
@@ -175,8 +176,8 @@ class _AssetGraphMatcher extends Matcher {
175176 matches = false ;
176177 }
177178
178- final configuration = node.globNodeConfiguration;
179- final expectedConfiguration = expectedNode.globNodeConfiguration;
179+ final configuration = node.globNodeConfiguration! ;
180+ final expectedConfiguration = expectedNode.globNodeConfiguration! ;
180181 if (configuration.glob.pattern !=
181182 expectedConfiguration.glob.pattern) {
182183 matchState['glob of ${node .id }' ] = [
@@ -188,9 +189,9 @@ class _AssetGraphMatcher extends Matcher {
188189 }
189190 } else if (node.type == NodeType .postProcessAnchor) {
190191 if (expectedNode.type == NodeType .postProcessAnchor) {
191- final nodeConfiguration = node.postProcessAnchorNodeConfiguration;
192+ final nodeConfiguration = node.postProcessAnchorNodeConfiguration! ;
192193 final expectedNodeConfiguration =
193- expectedNode.postProcessAnchorNodeConfiguration;
194+ expectedNode.postProcessAnchorNodeConfiguration! ;
194195 if (nodeConfiguration.actionNumber !=
195196 expectedNodeConfiguration.actionNumber) {
196197 matchState['actionNumber of ${node .id }' ] = [
@@ -207,8 +208,8 @@ class _AssetGraphMatcher extends Matcher {
207208 ];
208209 matches = false ;
209210 }
210- final nodeState = node.postProcessAnchorNodeState;
211- final expectedNodeState = expectedNode.postProcessAnchorNodeState;
211+ final nodeState = node.postProcessAnchorNodeState! ;
212+ final expectedNodeState = expectedNode.postProcessAnchorNodeState! ;
212213 if (checkPreviousInputsDigest &&
213214 nodeState.previousInputsDigest !=
214215 expectedNodeState.previousInputsDigest) {
@@ -250,8 +251,9 @@ class _AssetGraphMatcher extends Matcher {
250251 bool verbose,
251252 ) {
252253 matchState.forEach ((k, v) {
253- v = v as List ;
254- mismatchDescription.add ('$k : got ${v [0 ]} but expected ${v [1 ]}' );
254+ if (v is List ) {
255+ mismatchDescription.add ('$k : got ${v [0 ]} but expected ${v [1 ]}' );
256+ }
255257 });
256258
257259 return mismatchDescription;
0 commit comments