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

Unified Diff: tests/corelib_2/num_clamp_static_test.dart

Issue 2987203002: Migrated test block 17 to Dart 2.0. (Closed)
Patch Set: Created 3 years, 5 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
Index: tests/corelib_2/num_clamp_static_test.dart
diff --git a/tests/corelib_2/num_clamp_static_test.dart b/tests/corelib_2/num_clamp_static_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..5afcc9aef1aef01153c1992f95aaf992d4ccf075
--- /dev/null
+++ b/tests/corelib_2/num_clamp_static_test.dart
@@ -0,0 +1,27 @@
+// 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.
+// Test num.clamp.
Bob Nystrom 2017/07/31 21:26:40 You can just delete this test. We no longer need t
+
+import "package:expect/expect.dart";
+
+testIntClamp() {
+ var a = 0.clamp("str", -1); /*@compile-error=unspecified*/
+ var b = 0.clamp(0, "2"); /*@compile-error=unspecified*/
+}
+
+testDoubleClamp() {
+ var a = 0.0.clamp("str", -1.0); /*@compile-error=unspecified*/
+ var b = 0.0.clamp(0.0, "2"); /*@compile-error=unspecified*/
+}
+
+testDoubleClampInt() {
+ var a = 0.0.clamp("str", -1); /*@compile-error=unspecified*/
+ var b = 0.0.clamp(0, "2"); /*@compile-error=unspecified*/
+}
+
+main() {
+ testIntClamp();
+ testDoubleClamp();
+ testDoubleClampInt();
+}

Powered by Google App Engine
This is Rietveld 408576698