File: CommonTest.cpp

package info (click to toggle)
labplot 2.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 70,348 kB
  • sloc: cpp: 145,806; ansic: 4,534; python: 881; yacc: 540; xml: 357; sh: 185; awk: 35; makefile: 7
file content (30 lines) | stat: -rw-r--r-- 864 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
    File                 : CommonTest.cpp
    Project              : LabPlot
    Description          : General test class
    --------------------------------------------------------------------
    SPDX-FileCopyrightText: 2019 Stefan Gerlach <stefan.gerlach@uni.kn>

    SPDX-License-Identifier: GPL-2.0-or-later
*/

#include "CommonTest.h"
#include "backend/core/column/Column.h"
#ifdef _WIN32
#include <windows.h>
#endif

void CommonTest::initTestCase() {
#ifdef _WIN32
	if (AttachConsole(ATTACH_PARENT_PROCESS)) {
		freopen("CONOUT$", "w", stdout);
		freopen("CONOUT$", "w", stderr);
	}
#endif

	// needed in order to have the signals triggered by SignallingUndoCommand, see LabPlot.cpp
	//TODO: redesign/remove this
	qRegisterMetaType<const AbstractAspect*>("const AbstractAspect*");
	qRegisterMetaType<const AbstractColumn*>("const AbstractColumn*");
}