dart-sdk/tests
Jens Johansen d00bc2e89b Add test that currently crash DDC with kernel because of illegal js name
The named import makes it into the kernel class name (meaning it has a
dot in it). That is currently not cleaned up when creating js code,
but it is catched as a non-legal js identifier.

```
Unhandled exception:
Invalid argument (name): not a valid identifier: "_Object$collection.ListMixin"
#0      new Identifier (package:dev_compiler/src/js_ast/nodes.dart:1148)
#1      ProgramCompiler._emitClassStatement (package:dev_compiler/src/kernel/compiler.dart:573)
#2      ProgramCompiler._defineClass (package:dev_compiler/src/kernel/compiler.dart:679)
#3      ProgramCompiler._emitClassDeclaration (package:dev_compiler/src/kernel/compiler.dart:501)
#4      ProgramCompiler._emitClass (package:dev_compiler/src/kernel/compiler.dart:450)
#5      List.forEach (dart:core-patch/dart:core/growable_array.dart:274)
#6      ProgramCompiler._emitLibrary (package:dev_compiler/src/kernel/compiler.dart:393)
#7      Iterable.forEach (dart:core/iterable.dart:226)
#8      ProgramCompiler.emitProgram (package:dev_compiler/src/kernel/compiler.dart:282)
#9      compileToJSModule (package:dev_compiler/src/kernel/command.dart:166)
#10     _compile (package:dev_compiler/src/kernel/command.dart:145)
```

Bug:
Change-Id: Ibb5a1c908c2ddba63600446f6062ced1b5dd34c2
Reviewed-on: https://dart-review.googlesource.com/28662
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2017-12-12 13:36:50 +00:00
..
angular
co19 [vm/testing] Make --strong -c dartk configuration a Dart 2.0 configuration. 2017-12-12 12:19:10 +00:00
compiler Fix crashes caused by inlining 2017-12-12 08:07:29 +00:00
corelib Finish migrating stuff out of lib_strong. 2017-12-11 23:45:23 +00:00
corelib_2 Normalize all status files and enable presubmit hook. 2017-12-07 08:38:30 +00:00
dart
html Normalize all status files and enable presubmit hook. 2017-12-07 08:38:30 +00:00
isolate [vm/testing] Make --strong -c dartk configuration a Dart 2.0 configuration. 2017-12-12 12:19:10 +00:00
kernel [vm/testing] Make --strong -c dartk configuration a Dart 2.0 configuration. 2017-12-12 12:19:10 +00:00
language Reclassified a couple of test outcomes as "syntax error". 2017-12-07 14:24:48 +00:00
language_2 Add test that currently crash DDC with kernel because of illegal js name 2017-12-12 13:36:50 +00:00
lib Finish migrating stuff out of lib_strong. 2017-12-11 23:45:23 +00:00
lib_2 Reland "Use batch mode compilation for -cdartkp --strong" 2017-12-12 10:14:20 +00:00
search
standalone [vm/testing] Make --strong -c dartk configuration a Dart 2.0 configuration. 2017-12-12 12:19:10 +00:00
standalone_2 Normalize all status files and enable presubmit hook. 2017-12-07 08:38:30 +00:00
light_unittest.dart
README

Run Existing Tests
==================

See the output of

  ../tools/test.py --help

for how to run tests.

See also

  https://code.google.com/p/dart/wiki/Building#Testing

for detailed examples.

Create New Tests
================

See comments above

  factory StandardTestSuite.forDirectory

in

  ../tools/testing/dart/test_suite.dart

for the default test directory layout. By default test-file names must
end in "_test.dart", but some test suites, such as ./co19, subclass
StandardTestSuite and override this default.

See comments at the beginning of

  ../tools/testing/dart/multitest.dart

for how to create tests that pass by failing with a known error. For
example,

  ...
  int x = "not an int"; /// 01: static type warning
  ...

as part of a test will only pass the "--compiler dart2analyzer" test if
the assignment generates a static type warning.