blob: bed50f8774951648360f1e88b350b76a5a4c63ed [file] [log] [blame]
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
/// @assertion static void listEquals(
/// List expected, List actual, [String reason = ''])
/// Passing null as either expected or actual results in ExpectException.
/// @description Checks that ExpectException is thrown if any of the required
/// arguments are null.
/// @author rodionov
import "../../../Utils/expect.dart";
main() {
check(null, []);
check(null, [], "");
check(null, [], "not empty");
check([], null);
check([], null, "");
check([], null, "not empty");
check(null, null);
check(null, null, "");
check(null, null, "not empty");
}
void check(List? arg1, List? arg2, [String reason = '']) {
try {
Expect.listEquals(arg1, arg2, reason);
Expect.fail("Error expected");
} on ExpectException catch(e) {
}
}