[gjs] coverage: improve testSystem code coverage tests
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] coverage: improve testSystem code coverage tests
- Date: Mon, 13 Feb 2017 00:49:41 +0000 (UTC)
commit c1443c612579e1b8aa082a46fc280b1e3b5d315c
Author: Claudio André <claudioandre br gmail com>
Date: Fri Feb 10 10:48:00 2017 -0500
coverage: improve testSystem code coverage tests
https://bugzilla.gnome.org/show_bug.cgi?id=777752
installed-tests/js/testSystem.js | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/installed-tests/js/testSystem.js b/installed-tests/js/testSystem.js
index 66a868e..1211de4 100644
--- a/installed-tests/js/testSystem.js
+++ b/installed-tests/js/testSystem.js
@@ -1,4 +1,5 @@
const System = imports.system;
+const GObject = imports.gi.GObject;
describe('System.addressOf()', function () {
it('gives different results for different objects', function () {
@@ -10,6 +11,20 @@ describe('System.addressOf()', function () {
describe('System.version', function () {
it('gives a plausible number', function () {
- expect(System.version).not.toBeLessThan(13600);
+ expect(System.version).not.toBeLessThan(14700);
+ expect(System.version).toBeLessThan(20000);
+ });
+});
+
+describe('System.refcount()', function () {
+ it('gives the correct number', function () {
+ let o = new GObject.Object({});
+ expect(System.refcount(o)).toEqual(1);
+ });
+});
+
+describe('System.gc()', function () {
+ it('does not crash the application', function () {
+ expect(System.gc).not.toThrow();
});
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]