Gitweb links:
...log
http://git.netsurf-browser.org/libnslayout.git/shortlog/13ee56ee329244d3a...
...commit
http://git.netsurf-browser.org/libnslayout.git/commit/13ee56ee329244d3a1b...
...tree
http://git.netsurf-browser.org/libnslayout.git/tree/13ee56ee329244d3a1bb6...
The branch, master has been updated
via 13ee56ee329244d3a1bb6114ad3b0a8f14f392a9 (commit)
via 8e9c2de002d0592b8720f70826c287de36d1f959 (commit)
via 67a2b80df2804992ffd53365a54b014adb4f1c6e (commit)
from 9b0852e12713b44d4dd82ff67496c84a19af84b3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/libnslayout.git/commit/?id=13ee56ee329244d...
commit 13ee56ee329244d3a1bb6114ad3b0a8f14f392a9
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Install correct header file.
diff --git a/Makefile b/Makefile
index 0a84269..eed0e81 100644
--- a/Makefile
+++ b/Makefile
@@ -64,6 +64,6 @@ endif
# Extra installation rules
I := /$(INCLUDEDIR)/lib$(COMPONENT)
-INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/lib$(COMPONENT)/libnslayout.h
+INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/lib$(COMPONENT)/nslayout.h
INSTALL_ITEMS := $(INSTALL_ITEMS) /$(LIBDIR)/pkgconfig:lib$(COMPONENT).pc.in
INSTALL_ITEMS := $(INSTALL_ITEMS) /$(LIBDIR):$(OUTPUT)
commitdiff
http://git.netsurf-browser.org/libnslayout.git/commit/?id=8e9c2de002d0592...
commit 8e9c2de002d0592b8720f70826c287de36d1f959
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Move nslayout object tests.
diff --git a/test/Makefile b/test/Makefile
index 5703e79..24a036e 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,3 +1,3 @@
-DIR_TEST_ITEMS := testrunner:tests.c;assert-tests.c;basic-layout-tests.c
+DIR_TEST_ITEMS := testrunner:tests.c;assert-tests.c;nslayout_object-tests.c
include $(NSBUILD)/Makefile.subdir
diff --git a/test/basic-layout-tests.c b/test/basic-layout-tests.c
deleted file mode 100644
index 273cdf9..0000000
--- a/test/basic-layout-tests.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * This file is part of LibNSLayout's tests
- * Licensed under the ISC License,
http://opensource.org/licenses/ISC
- * Copyright 2015 Michael Drake <tlsa(a)netsurf-browser.org>
- */
-
-#include <check.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "tests.h"
-
-#ifndef UNUSED
-#define UNUSED(x) (void)(x)
-#endif
-
-static nslayout_error nslayout_test_callback(
- nslayout_layout *layout,
- void *pw,
- nslayout_request *req)
-{
- UNUSED(req);
- UNUSED(layout);
- UNUSED(pw);
- return NSLAYOUT_OK;
-}
-
-START_TEST (test_nslayout_layout_create_ok)
-{
- nslayout_layout *layout = NULL;
- nslayout_error error;
- dom_exception dom_error;
- css_error css_err;
- dom_document *doc;
- css_select_ctx *css_ctx;
- css_media_type media = CSS_MEDIA_SCREEN;
-
- /* Create a DOM document */
- dom_error = dom_implementation_create_document(DOM_IMPLEMENTATION_HTML,
- NULL, NULL, NULL, NULL, NULL, &doc);
- ck_assert(dom_error == DOM_NO_ERR);
-
- /* Create a selection context (with no sheets added) */
- css_err = css_select_ctx_create(&css_ctx);
- ck_assert(css_err == CSS_OK);
-
- error = nslayout_layout_create(doc,
- css_ctx,
- &media,
- nslayout_test_callback,
- NULL,
- &layout);
- fail_unless(error == NSLAYOUT_OK,
- "Unable to create layout");
- fail_unless(layout != NULL,
- "Returned OK but str was still NULL");
-
- error = nslayout_layout_destroy(layout);
- fail_unless(error == NSLAYOUT_OK,
- "Unable to destroy layout");
-
- css_err = css_select_ctx_destroy(css_ctx);
- ck_assert(css_err == CSS_OK);
-
- dom_node_unref(doc);
-}
-END_TEST
-
-
-void nslayout_basic_layout_suite(SRunner *sr)
-{
- Suite *s = suite_create("libnslayout: basic layout tests");
- TCase *tc_layout_basic = tcase_create("Creation/Destruction");
-
- tcase_add_test(tc_layout_basic, test_nslayout_layout_create_ok);
- suite_add_tcase(s, tc_layout_basic);
-
- srunner_add_suite(sr, s);
-}
diff --git a/test/nslayout_object-tests.c b/test/nslayout_object-tests.c
new file mode 100644
index 0000000..a2f9afc
--- /dev/null
+++ b/test/nslayout_object-tests.c
@@ -0,0 +1,79 @@
+/*
+ * This file is part of LibNSLayout's tests
+ * Licensed under the ISC License,
http://opensource.org/licenses/ISC
+ * Copyright 2015 Michael Drake <tlsa(a)netsurf-browser.org>
+ */
+
+#include <check.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "tests.h"
+
+#ifndef UNUSED
+#define UNUSED(x) (void)(x)
+#endif
+
+static nslayout_error nslayout_test_callback(
+ nslayout_layout *layout,
+ void *pw,
+ nslayout_request *req)
+{
+ UNUSED(req);
+ UNUSED(layout);
+ UNUSED(pw);
+ return NSLAYOUT_OK;
+}
+
+START_TEST (test_nslayout_layout_create_ok)
+{
+ nslayout_layout *layout = NULL;
+ nslayout_error error;
+ dom_exception dom_error;
+ css_error css_err;
+ dom_document *doc;
+ css_select_ctx *css_ctx;
+ css_media_type media = CSS_MEDIA_SCREEN;
+
+ /* Create a DOM document */
+ dom_error = dom_implementation_create_document(DOM_IMPLEMENTATION_HTML,
+ NULL, NULL, NULL, NULL, NULL, &doc);
+ ck_assert(dom_error == DOM_NO_ERR);
+
+ /* Create a selection context (with no sheets added) */
+ css_err = css_select_ctx_create(&css_ctx);
+ ck_assert(css_err == CSS_OK);
+
+ error = nslayout_layout_create(doc,
+ css_ctx,
+ &media,
+ nslayout_test_callback,
+ NULL,
+ &layout);
+ fail_unless(error == NSLAYOUT_OK,
+ "Unable to create layout");
+ fail_unless(layout != NULL,
+ "Returned OK but str was still NULL");
+
+ error = nslayout_layout_destroy(layout);
+ fail_unless(error == NSLAYOUT_OK,
+ "Unable to destroy layout");
+
+ css_err = css_select_ctx_destroy(css_ctx);
+ ck_assert(css_err == CSS_OK);
+
+ dom_node_unref(doc);
+}
+END_TEST
+
+
+void nslayout_nslayout_object_suite(SRunner *sr)
+{
+ Suite *s = suite_create("libnslayout: nslayout object tests");
+ TCase *tc_layout_basic = tcase_create("Creation/Destruction");
+
+ tcase_add_test(tc_layout_basic, test_nslayout_layout_create_ok);
+ suite_add_tcase(s, tc_layout_basic);
+
+ srunner_add_suite(sr, s);
+}
diff --git a/test/tests.c b/test/tests.c
index a58e038..48fc68c 100644
--- a/test/tests.c
+++ b/test/tests.c
@@ -40,7 +40,7 @@ int main(int argc, char **argv)
#ifndef NDEBUG
nslayout_assert_suite(sr);
#endif
- nslayout_basic_layout_suite(sr);
+ nslayout_nslayout_object_suite(sr);
srunner_set_fork_status(sr, CK_FORK);
srunner_run_all(sr, CK_ENV);
diff --git a/test/tests.h b/test/tests.h
index 4f7795f..9f05d9c 100644
--- a/test/tests.h
+++ b/test/tests.h
@@ -14,6 +14,6 @@
#include <libnslayout/nslayout.h>
extern void nslayout_assert_suite(SRunner *);
-extern void nslayout_basic_layout_suite(SRunner *);
+extern void nslayout_nslayout_object_suite(SRunner *);
#endif
commitdiff
http://git.netsurf-browser.org/libnslayout.git/commit/?id=67a2b80df280499...
commit 67a2b80df2804992ffd53365a54b014adb4f1c6e
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Client may pass NULL pointer for its pw.
diff --git a/src/layout.c b/src/layout.c
index 915475b..b5d74c2 100644
--- a/src/layout.c
+++ b/src/layout.c
@@ -29,7 +29,6 @@ nslayout_error nslayout_layout_create(
assert(css_ctx != NULL);
assert(media != NULL);
assert(cb != NULL);
- assert(pw != NULL);
l = calloc(1, sizeof(nslayout_layout));
if (l == NULL) {
diff --git a/test/basic-layout-tests.c b/test/basic-layout-tests.c
index cdaf5e2..273cdf9 100644
--- a/test/basic-layout-tests.c
+++ b/test/basic-layout-tests.c
@@ -14,8 +14,6 @@
#define UNUSED(x) (void)(x)
#endif
-int pw;
-
static nslayout_error nslayout_test_callback(
nslayout_layout *layout,
void *pw,
@@ -50,7 +48,7 @@ START_TEST (test_nslayout_layout_create_ok)
css_ctx,
&media,
nslayout_test_callback,
- &pw,
+ NULL,
&layout);
fail_unless(error == NSLAYOUT_OK,
"Unable to create layout");
-----------------------------------------------------------------------
Summary of changes:
Makefile | 2 +-
src/layout.c | 1 -
test/Makefile | 2 +-
test/{basic-layout-tests.c => nslayout_object-tests.c} | 8 +++-----
test/tests.c | 2 +-
test/tests.h | 2 +-
6 files changed, 7 insertions(+), 10 deletions(-)
rename test/{basic-layout-tests.c => nslayout_object-tests.c} (93%)
diff --git a/Makefile b/Makefile
index 0a84269..eed0e81 100644
--- a/Makefile
+++ b/Makefile
@@ -64,6 +64,6 @@ endif
# Extra installation rules
I := /$(INCLUDEDIR)/lib$(COMPONENT)
-INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/lib$(COMPONENT)/libnslayout.h
+INSTALL_ITEMS := $(INSTALL_ITEMS) $(I):include/lib$(COMPONENT)/nslayout.h
INSTALL_ITEMS := $(INSTALL_ITEMS) /$(LIBDIR)/pkgconfig:lib$(COMPONENT).pc.in
INSTALL_ITEMS := $(INSTALL_ITEMS) /$(LIBDIR):$(OUTPUT)
diff --git a/src/layout.c b/src/layout.c
index 915475b..b5d74c2 100644
--- a/src/layout.c
+++ b/src/layout.c
@@ -29,7 +29,6 @@ nslayout_error nslayout_layout_create(
assert(css_ctx != NULL);
assert(media != NULL);
assert(cb != NULL);
- assert(pw != NULL);
l = calloc(1, sizeof(nslayout_layout));
if (l == NULL) {
diff --git a/test/Makefile b/test/Makefile
index 5703e79..24a036e 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,3 +1,3 @@
-DIR_TEST_ITEMS := testrunner:tests.c;assert-tests.c;basic-layout-tests.c
+DIR_TEST_ITEMS := testrunner:tests.c;assert-tests.c;nslayout_object-tests.c
include $(NSBUILD)/Makefile.subdir
diff --git a/test/basic-layout-tests.c b/test/nslayout_object-tests.c
similarity index 93%
rename from test/basic-layout-tests.c
rename to test/nslayout_object-tests.c
index cdaf5e2..a2f9afc 100644
--- a/test/basic-layout-tests.c
+++ b/test/nslayout_object-tests.c
@@ -14,8 +14,6 @@
#define UNUSED(x) (void)(x)
#endif
-int pw;
-
static nslayout_error nslayout_test_callback(
nslayout_layout *layout,
void *pw,
@@ -50,7 +48,7 @@ START_TEST (test_nslayout_layout_create_ok)
css_ctx,
&media,
nslayout_test_callback,
- &pw,
+ NULL,
&layout);
fail_unless(error == NSLAYOUT_OK,
"Unable to create layout");
@@ -69,9 +67,9 @@ START_TEST (test_nslayout_layout_create_ok)
END_TEST
-void nslayout_basic_layout_suite(SRunner *sr)
+void nslayout_nslayout_object_suite(SRunner *sr)
{
- Suite *s = suite_create("libnslayout: basic layout tests");
+ Suite *s = suite_create("libnslayout: nslayout object tests");
TCase *tc_layout_basic = tcase_create("Creation/Destruction");
tcase_add_test(tc_layout_basic, test_nslayout_layout_create_ok);
diff --git a/test/tests.c b/test/tests.c
index a58e038..48fc68c 100644
--- a/test/tests.c
+++ b/test/tests.c
@@ -40,7 +40,7 @@ int main(int argc, char **argv)
#ifndef NDEBUG
nslayout_assert_suite(sr);
#endif
- nslayout_basic_layout_suite(sr);
+ nslayout_nslayout_object_suite(sr);
srunner_set_fork_status(sr, CK_FORK);
srunner_run_all(sr, CK_ENV);
diff --git a/test/tests.h b/test/tests.h
index 4f7795f..9f05d9c 100644
--- a/test/tests.h
+++ b/test/tests.h
@@ -14,6 +14,6 @@
#include <libnslayout/nslayout.h>
extern void nslayout_assert_suite(SRunner *);
-extern void nslayout_basic_layout_suite(SRunner *);
+extern void nslayout_nslayout_object_suite(SRunner *);
#endif
--
NetSurf Layout Engine