[gjs/wip/ptomato/tests: 20/26] tests: Move GType tests to testGTypeClass.js
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/ptomato/tests: 20/26] tests: Move GType tests to testGTypeClass.js
- Date: Sun, 18 Dec 2016 07:39:10 +0000 (UTC)
commit bb5a08eb8759652609ee97c8d788282c8d6f1a2d
Author: Philip Chimento <philip chimento gmail com>
Date: Sun Dec 4 13:10:45 2016 -0800
tests: Move GType tests to testGTypeClass.js
These didn't belong in testGIMarshalling, since they are testing the
native GType object and/or the GObject overrides for GType.
https://bugzilla.gnome.org/show_bug.cgi?id=775444
installed-tests/js/testGIMarshalling.js | 27 ---------------------------
installed-tests/js/testGTypeClass.js | 28 ++++++++++++++++++++++++++++
2 files changed, 28 insertions(+), 27 deletions(-)
---
diff --git a/installed-tests/js/testGIMarshalling.js b/installed-tests/js/testGIMarshalling.js
index afab8ac..34d7495 100644
--- a/installed-tests/js/testGIMarshalling.js
+++ b/installed-tests/js/testGIMarshalling.js
@@ -327,28 +327,6 @@ function testGValue() {
}
function testGType() {
- assertEquals("void", GObject.TYPE_NONE.name);
- assertEquals("gchararray", GObject.TYPE_STRING.name);
-
- // Make sure "name" is readonly
- try {
- GObject.TYPE_STRING.name = "foo";
- } catch(e) {
- }
- assertEquals("gchararray", GObject.TYPE_STRING.name);
-
- // Make sure "name" is permanent
- try {
- delete GObject.TYPE_STRING.name;
- } catch(e) {
- }
- assertEquals("gchararray", GObject.TYPE_STRING.name);
-
- // Make sure "toString" works
- assertEquals("[object GType for 'void']", GObject.TYPE_NONE.toString());
- assertEquals("[object GType for 'gchararray']", GObject.TYPE_STRING.toString());
-
- // Marshalling tests
assertEquals(GObject.TYPE_NONE, GIMarshallingTests.gtype_return());
assertEquals(GObject.TYPE_STRING, GIMarshallingTests.gtype_string_return());
@@ -364,11 +342,6 @@ function testGType() {
assertEquals(GObject.TYPE_INT, GIMarshallingTests.gtype_inout(GObject.TYPE_NONE));
}
-function testGTypePrototype() {
- assertNull(GIRepositoryGType.name);
- assertEquals("[object GType prototype]", GIRepositoryGType.toString());
-}
-
function testGValueGType() {
// test that inferring the GType for a primitive value or an object works
diff --git a/installed-tests/js/testGTypeClass.js b/installed-tests/js/testGTypeClass.js
index b0a877a..4375966 100644
--- a/installed-tests/js/testGTypeClass.js
+++ b/installed-tests/js/testGTypeClass.js
@@ -24,4 +24,32 @@ function testGObjectClass() {
JSUnit.assertEquals(true, p2.default_value);
}
+function testGType() {
+ JSUnit.assertEquals("void", GObject.TYPE_NONE.name);
+ JSUnit.assertEquals("gchararray", GObject.TYPE_STRING.name);
+
+ // Make sure "name" is readonly
+ try {
+ GObject.TYPE_STRING.name = "foo";
+ } catch(e) {
+ }
+ JSUnit.assertEquals("gchararray", GObject.TYPE_STRING.name);
+
+ // Make sure "name" is permanent
+ try {
+ delete GObject.TYPE_STRING.name;
+ } catch(e) {
+ }
+ JSUnit.assertEquals("gchararray", GObject.TYPE_STRING.name);
+
+ // Make sure "toString" works
+ JSUnit.assertEquals("[object GType for 'void']", GObject.TYPE_NONE.toString());
+ JSUnit.assertEquals("[object GType for 'gchararray']", GObject.TYPE_STRING.toString());
+}
+
+function testGTypePrototype() {
+ JSUnit.assertNull(GIRepositoryGType.name);
+ JSUnit.assertEquals("[object GType prototype]", GIRepositoryGType.toString());
+}
+
JSUnit.gjstestRun(this, JSUnit.setUp, JSUnit.tearDown);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]