Add copyright header.
Add a comment explaining what the test does.
Create a test that actually does something. Use the expect-annotations to
confuse the type-inferrer and check that the result is correct:
/// <HEADER>
import 'package:expect/expect.dart';
// Dart2js was crashing when a default argument contained an escaped character.
foo([a='\u00a0']) => a;
bar() => '';
@NoInline
@AssumeDynamic
confuse(x) => x;
main() {
Expect.equals('\u00a0', confuse(foo)());
Expect.equals('', confuse(bar)());
}
On 2015/05/07 01:14:29, floitsch wrote:
> Add copyright header.
>
> Add a comment explaining what the test does.
>
> Create a test that actually does something. Use the expect-annotations to
> confuse the type-inferrer and check that the result is correct:
>
> /// <HEADER>
> import 'package:expect/expect.dart';
>
> // Dart2js was crashing when a default argument contained an escaped
character.
> foo([a='\u00a0']) => a;
> bar() => '';
>
> @NoInline
> @AssumeDynamic
> confuse(x) => x;
>
> main() {
> Expect.equals('\u00a0', confuse(foo)());
> Expect.equals('', confuse(bar)());
> }
>
Issue 1126423002: Avoid reparsing metadata expressions
(Closed)
Created 5 years, 7 months ago by Siggi Cherem (dart-lang)
Modified 5 years, 7 months ago
Reviewers: floitsch
Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Comments: 12