cleanup(build): remove traceur-based Dart transpiler
This commit is contained in:
@ -1,55 +0,0 @@
|
||||
import {describe, it, expect} from 'angular2/test_lib';
|
||||
import {ListWrapper, MapWrapper} from 'angular2/src/facade/collection';
|
||||
import {IterableList} from './fixtures/facade';
|
||||
|
||||
export function main() {
|
||||
// TODO(tbosch): For ... of is not supported by our Dart transpiler right now.
|
||||
// Vojta had a traceur branch that reverted https://github.com/google/traceur-compiler/commit/2d12b2f9cea86e4f234c90dcc188b4c7a2881359
|
||||
// to make it work, but we should first implement this in a proper way before we start using it!
|
||||
|
||||
// describe('for..of', function() {
|
||||
// it('should iterate iterable', function() {
|
||||
// var values = ['a', 'b', 'c'];
|
||||
// var result = ListWrapper.create();
|
||||
// for (var value of new IterableList(values)) {
|
||||
// ListWrapper.push(result, value);
|
||||
// }
|
||||
// expect(result).toEqual(values);
|
||||
// });
|
||||
|
||||
// it('should iterate iterable without var declaration list', function() {
|
||||
// var values = ['a', 'b', 'c'];
|
||||
// var result = ListWrapper.create();
|
||||
// var value;
|
||||
// for (value of new IterableList(values)) {
|
||||
// ListWrapper.push(result, value);
|
||||
// }
|
||||
// expect(value).toEqual('c');
|
||||
// expect(result).toEqual(values);
|
||||
// });
|
||||
|
||||
// it('should iterate maps', function() {
|
||||
// var values = [['a', 1], ['b', 2], ['c', 3]];
|
||||
// var result = ListWrapper.create();
|
||||
// var map = MapWrapper.createFromPairs(values);
|
||||
// for (var [key, value] of MapWrapper.iterable(map)) {
|
||||
// ListWrapper.push(result, [key, value]);
|
||||
// }
|
||||
// expect(result).toEqual(values);
|
||||
// });
|
||||
|
||||
// it('should iterate maps without var declaration list', function() {
|
||||
// var values = [['a', 1], ['b', 2], ['c', 3]];
|
||||
// var result = ListWrapper.create();
|
||||
// var map = MapWrapper.createFromPairs(values);
|
||||
// var key, value;
|
||||
// for ([key, value] of MapWrapper.iterable(map)) {
|
||||
// ListWrapper.push(result, [key, value]);
|
||||
// }
|
||||
// expect(key).toEqual('c');
|
||||
// expect(value).toEqual(3);
|
||||
// expect(result).toEqual(values);
|
||||
// });
|
||||
// });
|
||||
}
|
||||
|
@ -1,46 +0,0 @@
|
||||
import {describe, it, expect, IS_DARTIUM} from 'angular2/test_lib';
|
||||
|
||||
import {Foo, Bar} from './foo';
|
||||
// TODO: Does not work, as dart does not support renaming imports
|
||||
// import {Foo as F} from './fixtures/foo';
|
||||
import * as fooModule from './foo';
|
||||
|
||||
import * as exportModule from './export';
|
||||
|
||||
import {Type} from 'angular2/src/facade/lang';
|
||||
|
||||
import {Baz} from './reexport';
|
||||
|
||||
export function main() {
|
||||
describe('imports', function() {
|
||||
it('should re-export imported vars', function() {
|
||||
expect(Baz).toBe('BAZ');
|
||||
});
|
||||
|
||||
it('should work', function() {
|
||||
expect(Foo).toBe('FOO');
|
||||
expect(Bar).toBe('BAR');
|
||||
// TODO: Does not work
|
||||
// assert(F == 'FOO');
|
||||
expect(fooModule.Foo).toBe('FOO');
|
||||
expect(fooModule.Bar).toBe('BAR');
|
||||
|
||||
expect(exportModule.Foo).toBe('FOO');
|
||||
expect(exportModule.Bar).toBe('BAR');
|
||||
expect(exportModule.Bar1).toBe('BAR1');
|
||||
expect(exportModule.Bar2).toBe('BAR2');
|
||||
|
||||
// Make sure Bar3 is not re-exported.
|
||||
expect(function() {
|
||||
exportModule.Bar3();
|
||||
}).toThrowError(IS_DARTIUM ?
|
||||
// Dart
|
||||
"No top-level method 'exportModule.Bar3' declared.":
|
||||
// JavaScript
|
||||
new RegExp('.*is not a function')
|
||||
);
|
||||
|
||||
expect(Type).toBeTruthy();
|
||||
});
|
||||
});
|
||||
}
|
@ -71,10 +71,7 @@ export function main() {
|
||||
|
||||
expect(function() {
|
||||
wf.name = true;
|
||||
}).toThrowError(IS_DARTIUM ?
|
||||
// Dart
|
||||
"type 'bool' is not a subtype of type 'String' of 'value'" :
|
||||
// JavaScript
|
||||
}).toThrowError(
|
||||
// TODO(vojta): Better error, it's not first argument, it's setting a field.
|
||||
'Invalid arguments given!\n' +
|
||||
' - 1st argument has to be an instance of string, got true'
|
||||
@ -86,10 +83,7 @@ export function main() {
|
||||
it('should fail when setting wrong type value', function() {
|
||||
expect(function() {
|
||||
WithFields.id = true;
|
||||
}).toThrowError(IS_DARTIUM ?
|
||||
// Dart
|
||||
"type 'bool' is not a subtype of type 'num' of 'id'" :
|
||||
// JavaScript
|
||||
}).toThrowError(
|
||||
// TODO(vojta): Better error, it's not first argument, it's setting a field.
|
||||
'Invalid arguments given!\n' +
|
||||
' - 1st argument has to be an instance of number, got true'
|
||||
|
Reference in New Issue
Block a user