Commit Graph

40 Commits

Author SHA1 Message Date
Robert Nystrom a4d799c402 Migrate corelib/ tests starting with b-d to NNBD.
Note that cast_test.dart isn't migrated yet due to #39517.

First patch set is just copying the tests over. The second patchset has
the actual meaningful changes.

Change-Id: I89233f20187b4305a776f865cde09a984423fa4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125920
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2019-12-02 23:13:10 +00:00
Bob Nystrom f6ca2c1d8f Remove the Dart 1 tests.
This deletes:

tests/co19
tests/corelib
tests/html
tests/isolate
tests/language
tests/lib

It does not delete tests/standalone because apparently there are tests
in there that are not in standalone_2. (I assume they were added after
the test migration. I don't know why they were added there.)

I have tried to remove references to the old tests from various scripts
and tools but may have missed some. (As you can imagine, grepping for
"lib" does not have the best signal-to-noise ratio.)

"It was a pleasure to burn. It was a special pleasure to see things
eaten, to see things blackened and changed. With the brass nozzle in his
fists, with this great python spitting its venomous kerosene upon the
world, the blood pounded in his head, and his hands were the hands of
some amazing conductor playing all the symphonies of blazing and burning
to bring down the tatters and charcoal ruins of history."

- Ray Bradbury, Fahrenheit 451

Change-Id: If3db4a50e7a5ee25aff8058b1483e2ce8e68424e
Reviewed-on: https://dart-review.googlesource.com/c/75420
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Terry Lucas <terry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-10-11 23:45:18 +00:00
Bob Nystrom edee53f93d Bring back the deleted 1.0 corelib tests.
What is dead may never die.

Change-Id: I80ef766b8ce2b6e1416df8e1f9b91fb74169dc79
Reviewed-on: https://dart-review.googlesource.com/7483
Reviewed-by: William Hesse <whesse@google.com>
2017-09-21 18:29:40 +00:00
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
Jacob Richman 2dcd56ef43 Format all tests.
There are far too many files here to review everyone carefully.
Spot checking most of the diffs look good as test code is generally written
with less care than application code so lots of ugly formatting get through.
If people notice files where the automated formatting bothers them feel free
to comment indicating file names and I'll move spaces within comments to make
the formatting cleaner and use comments to force block formatting as I have
done for other case where formatting looked bad.

BUG=
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2771453003 .
2017-04-17 14:53:02 -07:00
Zach Anderson 22e449ba09 Fix Windows time zone name extraction. Update API docs
On Windows, the OS provides a full name for the time zone
rather than an abbreviation. Further the string may
contain non-ASCII characters, so a conversion is
necessary. This CL updates the API docs to match the
actual behavior, and fixes the string conversion problem.

fixes #17085

R=asiva@google.com

Review URL: https://codereview.chromium.org/2069783002 .
2016-06-14 13:51:19 -07:00
Florian Loitsch c95b4e46ff Enable more DateTime tests on dart2js.
Review URL: https://codereview.chromium.org/1520613002 .
2015-12-10 19:49:30 +01:00
Florian Loitsch 581392cf17 Fix datetime test.
R=lrn@google.com

Review URL: https://codereview.chromium.org/1511773003 .
2015-12-09 20:24:40 +01:00
Florian Loitsch db643f5ae2 Fix datetime test.
Review URL: https://codereview.chromium.org/1514483003 .
2015-12-09 02:57:05 +01:00
Florian Loitsch 6c84c42e67 Add microsecond support to DateTime.
R=iposva@google.com, lrn@google.com

Review URL: https://codereview.chromium.org/1493033003 .
2015-12-09 00:46:46 +01:00
lrn@google.com a3c7e0a0d9 Fix date_time_test to not assume a particular slowness of running code.
R=ricow@google.com

Review URL: https://codereview.chromium.org//759753010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42083 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-03 07:19:49 +00:00
lrn@google.com 3a26858a99 Document DateTime.parse accepted format.
Mention in toString and toIso8601String that the output can be
put back into parse.

Change description of format to match the corresponding format letters
used by package:intl.

BUG= http://dartbug.com/21226
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//629943002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40919 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-06 10:13:54 +00:00
lrn@google.com c30a903949 Change DateTime.parse FormatException messages; update tests
BUG= https://code.google.com/p/dart/issues/detail?id=17753
R=lrn@google.com

Review URL: https://codereview.chromium.org//324213003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38974 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-07 09:41:44 +00:00
floitsch@google.com ace6af2dc6 Fix bad HttpDate.format.
BUG= http://dartbug.com/17916
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//219503002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34557 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-31 15:22:16 +00:00
lrn@google.com 1534e6729a Remove "static" caused by bad merge.
Review URL: https://codereview.chromium.org//172413002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32792 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-19 13:53:52 +00:00
lrn@google.com 849dcbeec7 Remove "function" in front of function. This is not JS!
Review URL: https://codereview.chromium.org//172393002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32789 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-19 13:24:16 +00:00
lrn@google.com a809fd5fb7 Add time-zone parsing to DateTime.parse.
A non-zero time offset is now understood, and the result is converted
to the equivalent UTC time.

More comments.

BUG= http://dartbug.com/16527 http://dartbug/16861
R=floitsch@google.com

Review URL: https://codereview.chromium.org//169493002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32787 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-19 13:21:07 +00:00
lrn@google.com b27ccf41e3 Add toIso8601String to DateTime.
BUG= http://dartbug.com/16902
R=floitsch@google.com

Review URL: https://codereview.chromium.org//165723005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32786 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-19 13:00:09 +00:00
floitsch@google.com 0a26d0e20b Rename DateTime constants to full names.
BUG= http://dartbug.com/9441

Review URL: https://codereview.chromium.org//13841005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21189 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-10 09:23:26 +00:00
floitsch@google.com 8fd6d0aafd Remove Expect from core library.
Committed: https://code.google.com/p/dart/source/detail?r=19755
Reverted: http://code.google.com/p/dart/source/detail?r=19756

Review URL: https://codereview.chromium.org//12212016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20996 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 19:43:16 +00:00
floitsch@google.com 5dc8107c53 Revert "Remove Expect from core library."
This reverts commit 19755.

Review URL: https://codereview.chromium.org//12743005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19756 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-09 03:19:07 +00:00
floitsch@google.com 12dbd2fd70 Remove Expect from core library.
Review URL: https://codereview.chromium.org//12212016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19755 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-09 02:40:37 +00:00
floitsch@google.com adb99d0107 Deprecate comparison operators of DateTime.
Review URL: https://codereview.chromium.org//12221094

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18543 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-14 22:00:36 +00:00
floitsch@google.com 6cc34487ad Change new DateTime.fromString to DateTime.parse.
Review URL: https://codereview.chromium.org//12047046

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17550 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 12:20:39 +00:00
floitsch@google.com fb7b9e3c5c Rename Date to DateTime.
BUG=http://dartbug.com/1424

Review URL: https://codereview.chromium.org//11770004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17549 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 12:16:37 +00:00
regis@google.com adb534674c Change core lib, dart2js, and more for new optional parameters syntax and semantics (new semantics is not enforced yet).
Review URL: https://codereview.chromium.org//11090016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13684 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-16 16:03:47 +00:00
floitsch@google.com 96dc8493b8 Check if the decomposed date is in the correct range.
On IE Date.UTC does not return NaN for decomposed dates that lie outside
the valid range. Therefore add an additional check.

Fixes issue 4836.

Review URL: https://chromiumcodereview.appspot.com//10920010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11799 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-04 10:51:11 +00:00
ngeoffray@google.com 2812392ccf Fix date test.
Review URL: https://chromiumcodereview.appspot.com//10900025

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11526 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 16:23:45 +00:00
dominich@google.com 494e5b228e Updated VM and JS versions of Date to allow underflow and overflow.
Added many tests to check everything is working as expected.

BUG=2771

Committed: https://code.google.com/p/dart/source/detail?r=11453

Review URL: https://chromiumcodereview.appspot.com//10832166

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11522 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 15:09:14 +00:00
dominich@google.com 6d70844f1b Revert "Updated VM and JS versions of Date to allow underflow and overflow."
This reverts commit r11453.

TBR=floitsch@google.com

Review URL: https://chromiumcodereview.appspot.com//10894009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11456 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-28 15:48:29 +00:00
dominich@google.com 957192e887 Updated VM and JS versions of Date to allow underflow and overflow.
Added many tests to check everything is working as expected.

BUG=2771

Review URL: https://chromiumcodereview.appspot.com//10832166

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11453 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-28 15:31:43 +00:00
floitsch@google.com a51dc25968 Make isUtc a getter, change some method names in Date. Weekday is now 1 based.
isUtc is now a getter.
Date.hours -> Date.hour
Date.minutes -> Date.minute
Date.seconds -> Date.second
Date.milliseconds -> Date.millisecond
Date.fromEpoch -> Date.fromMillisecondsSinceEpoch
Date.value -> Date.millisecondsSinceEpoch
Date.MON == 1 (up to Date.SUN == 7).

Fixes issue 3444, 1985.

Review URL: https://chromiumcodereview.appspot.com//10538105

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8899 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 11:43:46 +00:00
floitsch@google.com dd61a23829 Reapply "Refactor Date implementation in VM."
This reapplies fixed versions of commit 7542 and commit 8544.
Original review URLs:
https://chromiumcodereview.appspot.com//10533068
https://chromiumcodereview.appspot.com//10544109

Review URL: https://chromiumcodereview.appspot.com//10534114

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8655 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-14 13:05:22 +00:00
floitsch@google.com eb92af4080 Revert "Refactor Date implementation in VM."
Also revert "Round days-computation to get rid of daylight-savings differences."

This reverts commit 7542 and commit 8544.

Review URL: https://chromiumcodereview.appspot.com//10534111

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8547 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 13:44:45 +00:00
floitsch@google.com 17de58fbaf Reapply "Refactor Date implementation in VM."
This reapplies a fixed version of commit 8533.
https://chromiumcodereview.appspot.com//10533068

Review URL: https://chromiumcodereview.appspot.com//10536116

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8542 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 12:04:36 +00:00
floitsch@google.com 02f39238ae Revert "Refactor Date implementation in VM."
This reverts commit 8533.

Review URL: https://chromiumcodereview.appspot.com//10536114

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8535 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 10:33:36 +00:00
floitsch@google.com 0e297362a2 Refactor Date implementation in VM.
Less (and simpler) native functions. More precise semantics (for both the
native functions as well as for the Date class itself).

Fixes issue 3201.

Review URL: https://chromiumcodereview.appspot.com//10533068

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8533 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 10:24:58 +00:00
floitsch@google.com cde1a8e09a new Date.now() should be in local timezone.
This error probably slipped in during the refactoring.

Review URL: https://chromiumcodereview.appspot.com//10537086

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8483 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-11 08:35:31 +00:00
floitsch@google.com a88e304d29 Deprecate use of timezones.
Review URL: https://chromiumcodereview.appspot.com//10411057

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7911 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-23 16:07:35 +00:00
sigmund@google.com d9eae90196 test rename overhaul: step 7 - corelib tests
Review URL: https://chromiumcodereview.appspot.com//10244009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7096 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-27 18:06:37 +00:00