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

Side by Side Diff: tests/language/function_syntax_test.dart

Issue 11361190: a === b -> identical(a, b) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Tests function statement and expression syntax. 5 // Tests function statement and expression syntax.
6 6
7 class FunctionSyntaxTest { 7 class FunctionSyntaxTest {
8 8
9 static void testMain 9 static void testMain
10 /* /// 00: compile-time error 10 /* /// 00: compile-time error
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 expectEvaluatesTo(false, ()=> false && false); 435 expectEvaluatesTo(false, ()=> false && false);
436 436
437 // Bitwise operations. 437 // Bitwise operations.
438 expectEvaluatesTo(3, ()=> 1 | 2); 438 expectEvaluatesTo(3, ()=> 1 | 2);
439 expectEvaluatesTo(2, ()=> 3 ^ 1); 439 expectEvaluatesTo(2, ()=> 3 ^ 1);
440 expectEvaluatesTo(1, ()=> 3 & 1); 440 expectEvaluatesTo(1, ()=> 3 & 1);
441 441
442 // Equality. 442 // Equality.
443 expectEvaluatesTo(true, ()=> 1 == 1); 443 expectEvaluatesTo(true, ()=> 1 == 1);
444 expectEvaluatesTo(false, ()=> 1 != 1); 444 expectEvaluatesTo(false, ()=> 1 != 1);
445 expectEvaluatesTo(true, ()=> 1 === 1); 445 expectEvaluatesTo(true, ()=> identical(1, 1));
446 expectEvaluatesTo(false, ()=> 1 !== 1); 446 expectEvaluatesTo(false, ()=> !identical(1, 1));
447 447
448 // Relational. 448 // Relational.
449 expectEvaluatesTo(true, ()=> 1 <= 1); 449 expectEvaluatesTo(true, ()=> 1 <= 1);
450 expectEvaluatesTo(false, ()=> 1 < 1); 450 expectEvaluatesTo(false, ()=> 1 < 1);
451 expectEvaluatesTo(false, ()=> 1 > 1); 451 expectEvaluatesTo(false, ()=> 1 > 1);
452 expectEvaluatesTo(true, ()=> 1 >= 1); 452 expectEvaluatesTo(true, ()=> 1 >= 1);
453 453
454 // Is. 454 // Is.
455 expectEvaluatesTo(true, ()=> 1 is int); 455 expectEvaluatesTo(true, ()=> 1 is int);
456 expectEvaluatesTo(true, ()=> 1.0 is double); 456 expectEvaluatesTo(true, ()=> 1.0 is double);
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 621
622 } 622 }
623 623
624 main 624 main
625 /* /// 74: compile-time error 625 /* /// 74: compile-time error
626 () 626 ()
627 */ /// 74: continued 627 */ /// 74: continued
628 { 628 {
629 FunctionSyntaxTest.testMain(); 629 FunctionSyntaxTest.testMain();
630 } 630 }
OLDNEW
« no previous file with comments | « tests/language/first_class_types_test.dart ('k') | tests/language/function_type_alias_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698