Gitweb links:
...log
http://git.netsurf-browser.org/libnslayout.git/shortlog/af02dd42e2e9adb341900dac10f96e684458dee6
...commit
http://git.netsurf-browser.org/libnslayout.git/commit/af02dd42e2e9adb341900dac10f96e684458dee6
...tree
http://git.netsurf-browser.org/libnslayout.git/tree/af02dd42e2e9adb341900dac10f96e684458dee6
The branch, master has been updated
discards c67cd8eaaeb63777c6c9118b0b49d82adaf77088 (commit)
via af02dd42e2e9adb341900dac10f96e684458dee6 (commit)
This update added new revisions after undoing existing revisions. That is
to say, the old revision is not a strict subset of the new revision. This
situation occurs when you --force push a change and generate a repository
containing something like this:
* -- * -- B -- O -- O -- O (c67cd8eaaeb63777c6c9118b0b49d82adaf77088)
\
N -- N -- N (af02dd42e2e9adb341900dac10f96e684458dee6)
When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.
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=af02dd42e2e9adb341900dac10f96e684458dee6
commit af02dd42e2e9adb341900dac10f96e684458dee6
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Tests: Rename the suite that just creates an empty layout.
diff --git a/test/Makefile b/test/Makefile
index 967d8da..feb4d77 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,3 +1,3 @@
-DIR_TEST_ITEMS := testrunner:tests.c;assert-tests.c;nslayout-object-tests.c
+DIR_TEST_ITEMS := testrunner:tests.c;assert-tests.c;basic-tests.c
include $(NSBUILD)/Makefile.subdir
diff --git a/test/basic-tests.c b/test/basic-tests.c
new file mode 100644
index 0000000..c4be121
--- /dev/null
+++ b/test/basic-tests.c
@@ -0,0 +1,83 @@
+/*
+ * This file is part of LibNSLayout's tests
+ * Licensed under the ISC License, http://opensource.org/licenses/ISC
+ * Copyright 2015 Michael Drake <[email protected]>
+ */
+
+#include <check.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "tests.h"
+
+#ifndef UNUSED
+#define UNUSED(x) (void)(x)
+#endif
+
+static nsl_error nsl_test_callback(
+ nsl_layout *layout,
+ void *pw,
+ nsl_request *req)
+{
+ UNUSED(req);
+ UNUSED(layout);
+ UNUSED(pw);
+ return NSL_OK;
+}
+
+START_TEST (test_nsl_layout_create_ok)
+{
+ nsl_layout *layout = NULL;
+ nsl_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);
+
+ ck_assert(nsl_init() == NSL_OK);
+
+ error = nsl_layout_create(doc,
+ css_ctx,
+ &media,
+ nsl_test_callback,
+ NULL,
+ &layout);
+ fail_unless(error == NSL_OK,
+ "Unable to create layout");
+ fail_unless(layout != NULL,
+ "Returned OK but str was still NULL");
+
+ error = nsl_layout_destroy(layout);
+ fail_unless(error == NSL_OK,
+ "Unable to destroy layout");
+
+ ck_assert(nsl_fini() == NSL_OK);
+
+ css_err = css_select_ctx_destroy(css_ctx);
+ ck_assert(css_err == CSS_OK);
+
+ dom_node_unref(doc);
+}
+END_TEST
+
+
+void nsl_basic_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_nsl_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
deleted file mode 100644
index 4a3f2c4..0000000
--- a/test/nslayout-object-tests.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * This file is part of LibNSLayout's tests
- * Licensed under the ISC License, http://opensource.org/licenses/ISC
- * Copyright 2015 Michael Drake <[email protected]>
- */
-
-#include <check.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "tests.h"
-
-#ifndef UNUSED
-#define UNUSED(x) (void)(x)
-#endif
-
-static nsl_error nsl_test_callback(
- nsl_layout *layout,
- void *pw,
- nsl_request *req)
-{
- UNUSED(req);
- UNUSED(layout);
- UNUSED(pw);
- return NSL_OK;
-}
-
-START_TEST (test_nsl_layout_create_ok)
-{
- nsl_layout *layout = NULL;
- nsl_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);
-
- ck_assert(nsl_init() == NSL_OK);
-
- error = nsl_layout_create(doc,
- css_ctx,
- &media,
- nsl_test_callback,
- NULL,
- &layout);
- fail_unless(error == NSL_OK,
- "Unable to create layout");
- fail_unless(layout != NULL,
- "Returned OK but str was still NULL");
-
- error = nsl_layout_destroy(layout);
- fail_unless(error == NSL_OK,
- "Unable to destroy layout");
-
- ck_assert(nsl_fini() == NSL_OK);
-
- css_err = css_select_ctx_destroy(css_ctx);
- ck_assert(css_err == CSS_OK);
-
- dom_node_unref(doc);
-}
-END_TEST
-
-
-void nsl_nsl_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_nsl_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 9ca987c..e2edf88 100644
--- a/test/tests.c
+++ b/test/tests.c
@@ -40,7 +40,7 @@ int main(int argc, char **argv)
#ifndef NDEBUG
nsl_assert_suite(sr);
#endif
- nsl_nsl_object_suite(sr);
+ nsl_basic_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 fd89bea..1f31da7 100644
--- a/test/tests.h
+++ b/test/tests.h
@@ -14,6 +14,6 @@
#include <libnslayout/nslayout.h>
extern void nsl_assert_suite(SRunner *);
-extern void nsl_nsl_object_suite(SRunner *);
+extern void nsl_basic_suite(SRunner *);
#endif
-----------------------------------------------------------------------
Summary of changes:
src/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Makefile b/src/Makefile
index b02f0b9..7a6251d 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -6,6 +6,6 @@
# Released under the ISC License (see COPYING file)
# Sources
-DIR_SOURCES := layout.c node.c
+DIR_SOURCES := layout.c
include $(NSBUILD)/Makefile.subdir
--
NetSurf Layout Engine
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org