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

Unified Diff: pkg/smoke/test/common.dart

Issue 208583003: Fix string literals and add support for static methods in smoke. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: minor fix - inlcude name for static method too Created 6 years, 9 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/smoke/test/codegen/recorder_test.dart ('k') | pkg/smoke/test/static_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/smoke/test/common.dart
diff --git a/pkg/smoke/test/common.dart b/pkg/smoke/test/common.dart
index 35d2248fa845363497bba8a3164466ec81e5ae23..13a8ebb1e9a01cf1a1c10a2cf74542b3d92d9669 100644
--- a/pkg/smoke/test/common.dart
+++ b/pkg/smoke/test/common.dart
@@ -53,6 +53,12 @@ main() {
expect(a.i, 41);
});
+ test('static invoke', () {
+ A.staticValue = 42;
+ smoke.invoke(A, #staticInc, []);
+ expect(A.staticValue, 43);
+ });
+
test('read and invoke function', () {
var a = new A();
expect(a.i, 42);
@@ -305,6 +311,10 @@ class A {
void inc0() { i++; }
void inc1(int v) { i = i + (v == null ? -10 : v); }
void inc2([int v]) { i = i + (v == null ? -10 : v); }
+
+ static int staticValue = 42;
+ static void staticInc() { staticValue++; }
+
}
class B {
« no previous file with comments | « pkg/smoke/test/codegen/recorder_test.dart ('k') | pkg/smoke/test/static_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698