Files
sdk/tests/language_2/language_2_spec_parser.status
T
Erik Ernst 40b6741778 Adds support for syntax error in tests to test.py.
This CL modifies the Dart source used from test.py such that it takes
`syntax error` into account as an expected outcome in test files (so
that we can have `//# 01: syntax error` with a similar meaning as
`//# 01: compile-time error`).

For all tools except the spec_parser, `syntax error` is the same
outcome as `compile-time error`; that is, nobody else will see the
difference.

For the spec_parser, `syntax error` is the outcome where parsing has
failed; `compile-time error` is taken to mean some other compile-time
error, i.e., the spec_parser is expected to _succeed_ when the
expected outcome is `compile-time error`.

Test files in language and language_2 have been adjusted to use the
outcome `syntax error` where appropriate.

The status files in language and language_2 for the spec_parser have
been adjusted such that they fit all the new `syntax error` outcomes
in test files.

Other status files have been adjusted in a few cases where tests were
corrected (because a compile-time error which was clearly not intended
to be a syntax error turned out to be caused by a typo, which means
that the actual compile-time error has never been tested).

The spec grammar Dart.g was adjusted in a few cases, when some bugs
were discovered. In particular, the treatment of Function has been
changed: It is now known by the parser that Function does not take
any type arguments. This makes no difference for developers, because
they cannot declare a type named Function anyway, but it means that
a number of tricky parsing issues were resolved.

Dart.g was also adjusted to allow `qualified` to contain three
identifiers, which is an old bug (preventing things like metadata on
the form `@p.C.myConst`).

Change-Id: Ie420887d45c882ef97c84143365219f8aa0d2933
Reviewed-on: https://dart-review.googlesource.com/18262
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2017-11-06 08:56:09 +00:00

127 lines
6.9 KiB
Plaintext

# Copyright (c) 2017, 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.
[ $compiler == spec_parser ]
# Negative tests with syntax errors.
getter_declaration_negative_test: Fail # Negative, uses getter with parameter.
interface_injection1_negative_test: Fail # Negative, uses interface injection.
interface_injection2_negative_test: Fail # Negative, uses interface injection.
issue1578_negative_test: Fail # Negative, is line noise.
is_not_class1_negative_test: Fail # Negative, uses `a is "A"`.
is_not_class4_negative_test: Fail # Negative, uses `a is A is A`.
label8_negative_test: Fail # Negative, uses misplaced label.
list_literal_negative_test: Fail # Negative, uses `new List<int>[1, 2]`.
map_literal_negative_test: Fail # Negative, uses `new Map<int>{..}`.
new_expression1_negative_test: Fail # Negative, uses `new id`.
new_expression2_negative_test: Fail # Negative, uses `new id(`.
new_expression3_negative_test: Fail # Negative, uses `new id(...`.
operator1_negative_test: Fail # Negative, declares static operator.
operator2_negative_test: Fail # Negative, declares `operator ===`.
prefix18_negative_test: Fail # Negative, uses `lib1.invalid` as library prefix.
string_escape4_negative_test: Fail # Negative, uses newline in string literal.
string_interpolate1_negative_test: Fail # Negative, misplaced '$'.
string_interpolate2_negative_test: Fail # Negative, misplaced '$'.
switch1_negative_test: Fail # Negative, `default` clause not last.
test_negative_test: Fail # Negative, uses non-terminated string literal.
unary_plus_negative_test: Fail # Negative, uses non-existing unary plus.
unhandled_exception_negative_test: Fail # Negative, defaults required parameter.
# Negative tests with non-syntax compile-time errors.
bad_initializer1_negative_test: Skip # Negative, not syntax.
bad_initializer2_negative_test: Skip # Negative, not syntax.
bad_named_constructor_negative_test: Skip # Negative, not syntax.
body_less_constructor_wrong_arg_negative_test: Skip # Negative, not syntax.
closure_call_wrong_argument_count_negative_test: Skip # Negative, not syntax.
const_optional_args_negative_test: Skip # Negative, not syntax.
constructor3_negative_test: Skip # Negative, not syntax.
constructor_call_wrong_argument_count_negative_test: Skip # Negative, not syntax.
constructor_redirect1_negative_test/01: Skip # Negative, not syntax.
constructor_redirect1_negative_test/none: Skip # Negative, not syntax.
constructor_redirect2_negative_test: Skip # Negative, not syntax.
constructor_setter_negative_test: Skip # Negative, not syntax.
duplicate_export_negative_test: Skip # Negative, not syntax.
duplicate_interface_negative_test: Skip # Negative, not syntax.
inst_field_initializer1_negative_test: Skip # Negative, not syntax.
instance_call_wrong_argument_count_negative_test: Skip # Negative, not syntax.
instance_method2_negative_test: Skip # Negative, not syntax.
instance_method_negative_test: Skip # Negative, not syntax.
interface2_negative_test: Skip # Negative, not syntax.
interface_static_method_negative_test: Skip # Negative, not syntax.
interface_static_non_final_fields_negative_test: Skip # Negative, not syntax.
label2_negative_test: Skip # Negative, not syntax.
label3_negative_test: Skip # Negative, not syntax.
label5_negative_test: Skip # Negative, not syntax.
label6_negative_test: Skip # Negative, not syntax.
library_negative_test: Skip # Negative, not syntax.
list_literal2_negative_test: Skip # Negative, not syntax.
map_literal2_negative_test: Skip # Negative, not syntax.
no_such_method_negative_test: Skip # Negative, not syntax.
non_const_super_negative_test: Skip # Negative, not syntax.
override_field_method1_negative_test: Skip # Negative, not syntax.
override_field_method2_negative_test: Skip # Negative, not syntax.
override_field_method4_negative_test: Skip # Negative, not syntax.
override_field_method5_negative_test: Skip # Negative, not syntax.
parameter_initializer1_negative_test: Skip # Negative, not syntax.
parameter_initializer2_negative_test: Skip # Negative, not syntax.
parameter_initializer3_negative_test: Skip # Negative, not syntax.
parameter_initializer4_negative_test: Skip # Negative, not syntax.
parameter_initializer6_negative_test: Skip # Negative, not syntax.
prefix10_negative_test: Skip # Negative, not syntax.
prefix11_negative_test: Skip # Negative, not syntax.
prefix12_negative_test: Skip # Negative, not syntax.
prefix13_negative_test: Skip # Negative, not syntax.
prefix15_negative_test: Skip # Negative, not syntax.
prefix1_negative_test: Skip # Negative, not syntax.
prefix2_negative_test: Skip # Negative, not syntax.
prefix3_negative_test: Skip # Negative, not syntax.
prefix4_negative_test: Skip # Negative, not syntax.
prefix5_negative_test: Skip # Negative, not syntax.
prefix6_negative_test: Skip # Negative, not syntax.
prefix7_negative_test: Skip # Negative, not syntax.
prefix8_negative_test: Skip # Negative, not syntax.
private_member1_negative_test: Skip # Negative, not syntax.
private_member2_negative_test: Skip # Negative, not syntax.
private_member3_negative_test: Skip # Negative, not syntax.
script1_negative_test: Skip # Negative, not syntax.
script2_negative_test: Skip # Negative, not syntax.
string_unicode1_negative_test: Skip # Negative, not syntax.
string_unicode2_negative_test: Skip # Negative, not syntax.
string_unicode3_negative_test: Skip # Negative, not syntax.
string_unicode4_negative_test: Skip # Negative, not syntax.
unhandled_exception_negative_test: Skip # Negative, not syntax.
# Tests containing intentional syntax errors.
double_invalid_test: Skip # Contains illegaly formatted double.
# Tests containing `native` (not part of the Dart grammar).
const_native_factory_test: Skip # Uses `native`.
# Wrong tests.
built_in_identifier_prefix_test: Skip # A built-in identifier can _not_ be a prefix.
# Tests with unintended syntax errors.
assertion_initializer_const_error2_test/*: Fail # Misplaced comma.
assertion_initializer_const_error2_test/cc02: Pass
external_test/21: Fail # Test expects `runtime error`, it is a syntax error.
# Tests using constructs which are not Dart syntax.
conditional_import_string_test: Fail # Uses conditional import.
conditional_import_test: Fail # Uses conditional import.
config_import_corelib_test: Fail # Uses conditional import.
config_import_test: Fail # Uses conditional import.
vm/debug_break_enabled_vm_test/01: Fail # Uses debug break.
vm/debug_break_enabled_vm_test/none: Fail # Uses debug break.
# Tests using generalized void.
void_type_function_types_test: Skip # Not yet supported.
# Tests that fail because of the deep nesting.
deep_nesting1_negative_test: Skip # Stack overflow.
deep_nesting2_negative_test: Skip # Stack overflow.
issue_1751477_test: Skip # Times out: 9 levels, exponential blowup => 430 secs.
# Tests that succeed, but are marked as failing elsewhere.
closure_type_test: Pass # Marked as RuntimeError for all in language_2.status.