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

Unified Diff: pkg/analysis_server/test/services/correction/fix_test.dart

Issue 1393953002: Add 'Add != null' quick fix. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 | « pkg/analysis_server/lib/src/services/correction/fix_internal.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/correction/fix_test.dart
diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart
index e501b42f5b67763806c300eac88ed3d603139ab9..2b6f848e331e4d2bcb0b35f996dadbd7eef5dfef 100644
--- a/pkg/analysis_server/test/services/correction/fix_test.dart
+++ b/pkg/analysis_server/test/services/correction/fix_test.dart
@@ -3097,6 +3097,25 @@ main(p) {
}
}
+ void test_nonBoolCondition_addNotNull() {
+ resolveTestUnit('''
+main(String p) {
+ if (p) {
+ print(p);
+ }
+}
+''');
+ assertHasFix(
+ DartFixKind.ADD_NE_NULL,
+ '''
+main(String p) {
+ if (p != null) {
+ print(p);
+ }
+}
+''');
+ }
+
void test_removeDeadCode_condition() {
resolveTestUnit('''
main(int p) {
« no previous file with comments | « pkg/analysis_server/lib/src/services/correction/fix_internal.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698