Chromium Code Reviews| 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(); |
| +} |