blob: 46a1f9eb7e11b52756296b9e1d4a36c1dd970b85 [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
* @reviewer msyabro
*/
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);
}