Skip to content

Commit df14fe8

Browse files
iscgarruevs
authored andcommitted
tests: reduce dependence on solvespace.h in order to reduce build time
Only include files that are actually needed, instead of using the huge dependency that is `solvespace.h`.
1 parent 3e5f891 commit df14fe8

8 files changed

Lines changed: 20 additions & 2 deletions

File tree

test/analysis/contour_area/test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "solvespace.h"
2+
13
#include "harness.h"
24

35
TEST_CASE(normal_roundtrip) {

test/constraint/pt_on_circle/test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "solvespace.h"
2+
13
#include "harness.h"
24

35
TEST_CASE(normal_roundtrip) {

test/core/expr/test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "expr.h"
2+
13
#include "harness.h"
24

35
#define CHECK_PARSE(var, expr) \

test/core/locale/test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "ui.h"
2+
13
#include "harness.h"
24

35
TEST_CASE(parseable) {

test/group/translate_asy/test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "solvespace.h"
2+
13
#include "harness.h"
24

35
TEST_CASE(normal_roundtrip) {

test/harness.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44
// Copyright 2016 whitequark
55
//-----------------------------------------------------------------------------
66
#include <chrono>
7+
#include <cmath>
78
#include <cstdio>
89
#include <random>
910
#include <regex>
1011
#include <cairo.h>
1112

13+
#include "solvespace.h"
14+
1215
#include "harness.h"
1316

1417
#if defined(WIN32)
@@ -19,7 +22,7 @@
1922

2023
namespace SolveSpace {
2124
namespace Platform {
22-
// These are defined in headless.cpp, and aren't exposed in solvespace.h.
25+
// These are defined in guinone.cpp, and aren't exposed in solvespace.h.
2326
extern std::vector<Platform::Path> fontFiles;
2427
}
2528
}

test/harness.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
//
44
// Copyright 2016 whitequark
55
//-----------------------------------------------------------------------------
6-
#include "solvespace.h"
6+
#include <functional>
7+
#include <string>
8+
9+
#include "platform/platform.h"
710

811
// Hack... we should rename the ones in ui.h instead.
912
#undef CHECK_TRUE

test/request/circle/test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "solvespace.h"
2+
13
#include "harness.h"
24

35
TEST_CASE(normal_roundtrip) {

0 commit comments

Comments
 (0)