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

Unified Diff: pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart

Issue 945113002: Add 'Convert Method to Getter' proposal only if it is an available refactoring. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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/test/edit/refactoring_test.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/refactoring/convert_method_to_getter_test.dart
diff --git a/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart b/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart
index 32780d8ed9763fb040a6163fa9dd09e72891623f..eea53857c2c38485802e07c00e21539688fb08e4 100644
--- a/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart
@@ -148,6 +148,15 @@ main() {
'Only methods without parameters can be converted to getters.');
}
+ test_checkInitialConditions_returnTypeVoid() {
+ indexTestUnit('''
+void test() {}
+''');
+ _createRefactoring('test');
+ // check conditions
+ _assertInitialConditions_fatal('Cannot convert function returning void.');
+ }
+
test_checkInitialConditions_localFunction() {
indexTestUnit('''
main() {
« no previous file with comments | « pkg/analysis_server/test/edit/refactoring_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698