Commit Graph

8 Commits

Author SHA1 Message Date
Aske Simon Christensen f5bf50e7a4 Adjust UTF-8 tests to match WHATWG standard expectations.
This adjusts all UTF-8 tests to the new semantics in the breaking
change described here: https://github.com/dart-lang/sdk/issues/41100

This has three parts:
- Unpaired surrogates are encoded as replacement characters, and
  encoded surrogates are considered malformed input when decoding.
- Decoding errors are generally reported on the position of the byte
  that conclusively makes the input malformed.
- The number of replacement characters emitted by the decoder is
  generally one per unfinished sequence or undecodable byte.

The code changes to implement the new semantics are placed in subsequent
commits.

Change-Id: I4cc8ce660e39287e734070764ab8e1f0ebb8b9e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143815
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-05-04 10:48:32 +00:00
Liam Appelbe 3929f299ae [nnbd] Fix json_utf8_chunk_test in strong mode
Change-Id: I1ad9e525520de99dd50cad14f7ed20fa50f50535
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144242
Auto-Submit: Liam Appelbe <liama@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-04-20 23:17:54 +00:00
Robert Nystrom b05a57d5f3 Migrate tests/lib_2/convert -> tests/lib/convert.
Change-Id: I04e64359acb95c63d1b5dc5c7fdfaadcb6c55fd9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130965
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-01-16 17:46:02 +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
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
lrn@google.com 75e49f5220 Fix test warnings and expect Safari mobile simulator bug.
Review URL: https://codereview.chromium.org//679143003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41319 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 15:07:20 +00:00
lrn@google.com 8050a0392b Fix assertion not holding (calling with start==end) and typo.
Review URL: https://codereview.chromium.org//677423002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41317 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 14:00:13 +00:00
lrn@google.com e2e17c3f26 Make JSON parsing work as a chunked conversion sink.
This allows JSON parsing to work on individual chunks of source instead
of collecting and concatenating all the parts before parsing.

This is made in anticipation of having a UTF-8 version that parses directly
on the input codes, without creating a String first.

R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41311 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 12:11:39 +00:00