Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Unified Diff: frog/tests/leg_only/label_test.dart

Issue 10536169: Move frog/tests/{leg,leg_only,frog_native} to tests/compiler/. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « frog/tests/leg_only/is_operator_test.dart ('k') | frog/tests/leg_only/leg_only.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/tests/leg_only/label_test.dart
===================================================================
--- frog/tests/leg_only/label_test.dart (revision 8644)
+++ frog/tests/leg_only/label_test.dart (working copy)
@@ -1,62 +0,0 @@
-// Copyright (c) 2012, 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.
-
-// A break label must be declared where it's used.
-undeclaredBreakLabel1() {
- foo: { break bar; break foo; } /// 01: compile-time error
-}
-
-undeclaredBreakLabel2() {
- foo: while (true) { break bar; break foo; } /// 02: compile-time error
-}
-
-// An unlabeled break must be inside a loop or switch.
-noBreakTarget() {
- foo: if (true) { break; break foo; } /// 03: compile-time error
-}
-
-// A continue label must be declared where it's used.
-undeclaredContinueLabel() {
- foo: for (;;) { continue bar; break foo; } /// 04: compile-time error
-}
-
-// An unlabeled continue must be inside a loop.
-noContinueTarget() {
- foo: if (true) continue; else break foo; /// 05: compile-time error
-}
-
-// A continue label must point to a continue-able statement.
-wrongContinueLabel() {
- foo: if (true) continue foo; /// 06: compile-time error
-}
-
-// Labels are not captured by closures.
-noncaptureLabel() {
- foo: { /// 07: compile-time error
- (() { break foo; })(); /// 07: continued
- break foo; /// 07: continued
- } /// 07: continued
-}
-
-// Implicit break targets are not captured by closures.
-noncaptureBreak() {
- while(true) (() { break; })(); /// 08: compile-time error
-}
-
-// Implicit continue targets are not captured by closures.
-noncaptureContinue() {
- while(true) (() { continue; })(); /// 09: compile-time error
-}
-
-main() {
- undeclaredBreakLabel1();
- undeclaredBreakLabel2();
- noBreakTarget();
- undeclaredContinueLabel();
- noContinueTarget();
- wrongContinueLabel();
- noncaptureLabel();
- noncaptureBreak();
- noncaptureContinue();
-}
« no previous file with comments | « frog/tests/leg_only/is_operator_test.dart ('k') | frog/tests/leg_only/leg_only.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698