mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 01:45:06 +00:00
352b41f289
Change-Id: I5832ab61eabbbbc03e0620be2f831b85663a7ac9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128340 Auto-Submit: Bob Nystrom <rnystrom@google.com> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com> Commit-Queue: Bob Nystrom <rnystrom@google.com>
15 lines
514 B
Dart
15 lines
514 B
Dart
// Copyright (c) 2014, 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 'dart:js';
|
|
import 'package:expect/expect.dart';
|
|
|
|
main() {
|
|
var dt = new DateTime.now();
|
|
var jsArray = new JsObject.jsify([dt]);
|
|
var roundTripped = jsArray[0];
|
|
Expect.isTrue(roundTripped is DateTime);
|
|
Expect.equals(dt.millisecondsSinceEpoch, roundTripped.millisecondsSinceEpoch);
|
|
}
|