[vte/wip/sixels: 105/111] sixel: test: Move to C++
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/wip/sixels: 105/111] sixel: test: Move to C++
- Date: Sat, 8 Aug 2020 18:43:03 +0000 (UTC)
commit 276ff42e7e35972fae71852328e3b3225e9ddbdd
Author: Christian Persch <chpe src gnome org>
Date: Sat Aug 8 20:42:49 2020 +0200
sixel: test: Move to C++
src/meson.build | 13 +++++++------
src/{test-sixels.c => sixel-test.cc} | 5 +++--
2 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/src/meson.build b/src/meson.build
index bcbfcad0..7901342d 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -463,14 +463,15 @@ test_refptr = executable(
install: false,
)
-test_sixels_sources = files(
- 'test-sixels.c'
+test_sixel_sources = files(
+ 'sixel-test.cc',
)
-test_sixels = executable(
- 'test-sixels',
- sources: test_sixels_sources,
- dependencies: [glib_dep],
+test_sixel = executable(
+ 'test-sixel',
+ sources: test_sixel_sources,
+ dependencies: [glib_dep,],
+ include_directories: top_inc,
install: false,
)
diff --git a/src/test-sixels.c b/src/sixel-test.cc
similarity index 99%
rename from src/test-sixels.c
rename to src/sixel-test.cc
index 9ecb12c5..3746f699 100644
--- a/src/test-sixels.c
+++ b/src/sixel-test.cc
@@ -15,12 +15,13 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
+#include "config.h"
+
#include <assert.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
-#include <stdbool.h>
#include <stdio.h>
#include <termios.h> /* TIOCGWINSZ */
@@ -519,7 +520,7 @@ random_fuzz (const Options *options, GString *gstr)
return;
for (int i = 0; i < options->n_errors; i++) {
- FuzzType fuzz_type = random () % FUZZ_MAX;
+ FuzzType fuzz_type = FuzzType(random () % FUZZ_MAX);
switch (fuzz_type) {
case FUZZ_REPLACE:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]