aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.me.uk>2018-11-01 23:30:52 +0100
committerThomas White <taw@bitwiz.me.uk>2018-11-01 23:31:02 +0100
commitb4eacefc2b97f390ea43d8c5c04a218890a6689b (patch)
treed99ececa33002a0570bf8497e4a26a8148269549
parentac114445ed6e5c8722a9eec0fe934df00c615f2d (diff)
Synchronise tests
These tests are the same, except that one has subframes and the other not. Therefore make the code actually identical.
-rw-r--r--tests/render_test.c6
-rw-r--r--tests/render_test_sc1.c7
2 files changed, 6 insertions, 7 deletions
diff --git a/tests/render_test.c b/tests/render_test.c
index be72efd..f206d0f 100644
--- a/tests/render_test.c
+++ b/tests/render_test.c
@@ -1,8 +1,6 @@
/*
* render_test.c
*
- * Rendering test
- *
* Copyright © 2012-2014 Thomas White <taw@bitwiz.org.uk>
*
* This file is part of Colloquium.
@@ -31,11 +29,11 @@
#include <stdlib.h>
#include <gtk/gtk.h>
#include <string.h>
+#include <assert.h>
#include "../src/sc_parse.h"
#include "../src/render.h"
#include "../src/frame.h"
-#include "../src/presentation.h"
const char *sc = "\\test{\\font[Sorts Mill Goudy 32]Lorem ipsum dolor sit amet, consect-etur adipiscing elit.\n\\font[Serif 17]Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. \\font[Edrip 32]{Nam tincidunt congue enim, ut porta lorem \\font[Edrip Bold 32]{lacinia} consectetur.} Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. \\wibble{Aenean} ut gravida lorem. Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. Ut convallis libero in urna ultrices accumsan. Donec sed odio eros. Donec viverra mi quis quam pulvinar at malesuada arcu rhoncus. \\font[Serif Bold 17]{Cum sociis natoque penatibus et magnis dis parturient} montes, nascetur ridiculus mus. In rutrum accumsan ultricies. Mauris vitae nisi at sem facilisis semper ac in est.}";
@@ -43,7 +41,7 @@ const char *sc = "\\test{\\font[Sorts Mill Goudy 32]Lorem ipsum dolor sit amet,
static gint mw_destroy(GtkWidget *w, void *p)
{
gtk_main_quit();
- return 0;
+ exit(0);
}
static gboolean draw_sig(GtkWidget *da, cairo_t *cr, gpointer data)
diff --git a/tests/render_test_sc1.c b/tests/render_test_sc1.c
index 4c773c8..cc6c307 100644
--- a/tests/render_test_sc1.c
+++ b/tests/render_test_sc1.c
@@ -1,11 +1,11 @@
/*
* render_test_sc1.c
*
- * Colloquium - A tiny presentation program
+ * Copyright © 2012-2014 Thomas White <taw@bitwiz.org.uk>
*
- * Copyright (c) 2012-2014 Thomas White <taw@bitwiz.org.uk>
+ * This file is part of Colloquium.
*
- * This program is free software: you can redistribute it and/or modify
+ * Colloquium is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
@@ -41,6 +41,7 @@ const char *sc = "\\test{Lorem ipsum dolor sit amet, consectetur adipiscing elit
static gint mw_destroy(GtkWidget *w, void *p)
{
+ gtk_main_quit();
exit(0);
}