blob: e145bf28e9fe8c86e3dfc6728449640b4aeea2b0 [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 final int millisecond
* Returns the millisecond into the second 0...999.
* @description Creates a new DateTime with various integer milliseconds values
* (0..999),
* and reads the value back.
* @author hlodvig
*/
import "../../../Utils/expect.dart";
main() {
for(int i = 999; i >= 0; --i){
check(i);
}
}
void check(int ms) {
DateTime date = new DateTime(2011, 1, 1, 0, 0, 0, ms);
Expect.isTrue(date.millisecond is int);
Expect.equals(ms, date.millisecond);
}