Big merge from experimental to bleeding edge.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16687 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
floitsch@google.com
2013-01-07 11:23:16 +00:00
parent 309fcb1ba3
commit 4a7dfd2da3
564 changed files with 21235 additions and 7167 deletions
@@ -104,8 +104,7 @@ class TestReport {
}
int resultsMeanNanos() =>
(BlockSample._totalTime(results) /
BlockSample._totalCount(results)).toInt();
BlockSample._totalTime(results) ~/ BlockSample._totalCount(results);
int resultsWorstNanos() {
BlockSample worst = worstBlock(results);
@@ -199,7 +198,7 @@ class Runner {
static bool runTest(String testId) {
Options opts = new Options();
return opts.arguments.length == 0 ||
opts.arguments.some(_(String id) => id == testId);
opts.arguments.any((String id) => id == testId);
}
}
+4 -4
View File
@@ -37,15 +37,15 @@ class TestSuite {
print("OK -- ALL TESTS PASS (${results.length} run)");
} else {
for(TestResult r in
results.filter(bool _(TestResult r) => !(r is PassedTest))) {
results.where(bool _(TestResult r) => !(r is PassedTest))) {
print(r);
}
int passedTests =
results.filter(bool _(TestResult r) => r is PassedTest).length;
results.where(bool _(TestResult r) => r is PassedTest).length;
int failures =
results.filter(bool _(TestResult r) => r is FailedTest).length;
results.where(bool _(TestResult r) => r is FailedTest).length;
int errors =
results.filter(bool _(TestResult r) => r is TestError).length;
results.where(bool _(TestResult r) => r is TestError).length;
print("FAIL -- TESTS RUN: ${results.length}");
print(" PASSED: ${passedTests}");
print(" FAILED: ${failures}");
+2 -3
View File
@@ -113,13 +113,12 @@ class Utf16Tests extends TestClass {
void testIterableMethods() {
// empty input
Expect.isFalse(decodeUtf16AsIterable([]).iterator().hasNext);
Expect.isFalse(decodeUtf16AsIterable([]).iterator.moveNext());
IterableUtf16Decoder koreanDecoder =
decodeUtf16AsIterable(testKoreanCharSubsetUtf16beBom);
// get the first character
Expect.equals(testKoreanCharSubset.charCodes[0],
koreanDecoder.iterator().next());
Expect.equals(testKoreanCharSubset.charCodes[0], koreanDecoder.first);
// get the whole translation using the Iterable interface
Expect.stringEquals(testKoreanCharSubset,
new String.fromCharCodes(new List<int>.from(koreanDecoder)));
+2 -2
View File
@@ -165,13 +165,13 @@ class Utf32Tests extends TestClass {
void testIterableMethods() {
// empty input
Expect.isFalse(decodeUtf32AsIterable([]).iterator().hasNext);
Expect.isFalse(decodeUtf32AsIterable([]).iterator.moveNext());
IterableUtf32Decoder koreanDecoder =
decodeUtf32AsIterable(testKoreanCharSubsetUtf32beBom);
// get the first character
Expect.equals(testKoreanCharSubset.charCodes[0],
koreanDecoder.iterator().next());
koreanDecoder.iterator.first);
// get the whole translation using the Iterable interface
Expect.stringEquals(testKoreanCharSubset,
new String.fromCharCodes(new List<int>.from(koreanDecoder)));
+2 -3
View File
@@ -459,15 +459,14 @@ class Utf8Tests extends TestClass {
void testIterableMethods() {
IterableUtf8Decoder englishDecoder = decodeUtf8AsIterable(testEnglishUtf8);
// get the first character
Expect.equals(testEnglishUtf8[0], englishDecoder.iterator().next());
Expect.equals(testEnglishUtf8[0], englishDecoder.first);
// get the whole translation using the Iterable interface
Expect.stringEquals(testEnglishPhrase,
new String.fromCharCodes(new List<int>.from(englishDecoder)));
IterableUtf8Decoder kataDecoder = decodeUtf8AsIterable(testKatakanaUtf8);
// get the first character
Expect.equals(testKatakanaPhrase.charCodes[0],
kataDecoder.iterator().next());
Expect.equals(testKatakanaPhrase.charCodes[0], kataDecoder.first);
// get the whole translation using the Iterable interface
Expect.stringEquals(testKatakanaPhrase,
new String.fromCharCodes(new List<int>.from(kataDecoder)));