Skip to content

Commit

Permalink
Clean up for next tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HosseinYousefi committed Dec 12, 2024
1 parent fe3f9f6 commit c5a7bd8
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -745,14 +745,23 @@ void registerTests(String groupName, TestRunnerCallback test) {
}
});
}
test('Object methods work', () {
test('Object methods work', () async {
final runnable = MyRunnable.implement($MyRunnable(
run: () {},
));
expect(runnable == runnable, true);
expect(runnable != runnable, false);
expect(runnable.hashCode, runnable.hashCode);
expect(runnable.toString(), runnable.toString());
expect(MyRunnable.$impls, hasLength(1));
runnable.release();
if (!Platform.isAndroid) {
// Running garbage collection does not work on Android. Skipping
// this test for android.
_runJavaGC();
await _waitUntil(() => MyInterface.$impls.isEmpty);
expect(MyRunnable.$impls, isEmpty);
}
runnable.release();
});
}
Expand Down

0 comments on commit c5a7bd8

Please sign in to comment.