dart-sdk/tests/corelib_2/date_time8_test.dart
Janice Collins 998dd24dcc Migrate test block 5 to Dart 2.0.
Unusual things in this block:
- date_time10_test.dart had no strong mode fork, and reveals what looks
like a legit DDC bug at first glance.  Excluded it for now in the status file.
- date_time_test.dart had small differences between the two forks that looked
like an error.  Fixed.

BUG=
R=bkonyi@google.com, rnystrom@google.com

Review-Url: https://codereview.chromium.org/2984063002 .
2017-07-24 14:18:58 -07:00

23 lines
560 B
Dart

// Copyright (c) 2012, 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.
import "package:expect/expect.dart";
// Make sure the year 0 is correctly printed.
testUtc() {
var d = new DateTime.utc(0, 1, 1);
Expect.equals("0000-01-01 00:00:00.000Z", d.toString());
}
testLocal() {
var d = new DateTime(0, 1, 1);
Expect.equals("0000-01-01 00:00:00.000", d.toString());
}
main() {
testUtc();
testLocal();
}