fa1d2c896d
Expect.equals (and Expect.listEquals) takes expected first and actual second. When these are flipped in tests, the failure message can be super hard to understand. Bug: Change-Id: I1d3c5a31365fa41ee7bcc7781474d76de9184cd5 Reviewed-on: https://dart-review.googlesource.com/23420 Reviewed-by: Jonas Termansen <sortie@google.com> Commit-Queue: Kevin Millikin <kmillikin@google.com>
19 lines
386 B
Dart
19 lines
386 B
Dart
// Copyright (c) 2015, the Dart Team. All rights reserved. Use of this
|
|
// source code is governed by a BSD-style license that can be found in
|
|
// the LICENSE file.
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
confuse(x) => [1, 'x', true, null, x].last;
|
|
|
|
Iterable<int> foo() sync* {
|
|
var a = confuse(1);
|
|
if (a < 10) {
|
|
yield 2;
|
|
}
|
|
}
|
|
|
|
main() {
|
|
Expect.listEquals([2], foo().toList());
|
|
}
|