summaryrefslogtreecommitdiff
path: root/Build/source/libs/graphite/engine-2.4/test/RegressionTest/main.h
blob: fb52a58b4ec7a6de95e4ea89a6ffc541c21afd20 (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
/*--------------------------------------------------------------------*//*:Ignore this sentence.
Copyright (C) 2004 SIL International. All rights reserved.

Distributable under the terms of either the Common Public License or the
GNU Lesser General Public License, as specified in the LICENSING.txt file.

File: Main.h
Responsibility: Sharon Correll
Last reviewed: Not yet.

Description:
    Header files to include in the Graphite regression test program.
-------------------------------------------------------------------------------*//*:End Ignore*/

#ifdef _MSC_VER
#pragma once
#endif
#ifndef GRCOMPILER_H
#define GRCOMPILER_H 1

#define NO_EXCEPTIONS 1

// For some reason, WINVER defaults to zero and is not set to something reasonable soon enough:
#ifdef _WIN32
#ifndef WINVER
#define WINVER 0x0500
#endif
#endif

#ifdef _WIN32
// To allow call to IsDebuggerPresent:
#define _WIN32_WINNT WINVER
#endif

//:>********************************************************************************************
//:>	Include files
//:>********************************************************************************************
#include "stdafx.h"
////#include "resource.h"
// #include <hash_map>
#include <fstream>
#include <iostream>
#include <vector>
////#include <algorithm>
#include <string>
#include <cstring>

#ifdef _WIN32
#include "windows.h"
#ifdef _MSC_VER
#include <crtdbg.h>
#endif
#endif // _WIN32
#include <assert.h>

////using std::max;
////using std::min;

#include "GrCommon.h"
#include "GrPlatform.h"

////////#include "LgCharPropsStub.h"

#include "GrConstants.h"
///#include "TtfUtil.h"
///#include "Tt.h"

#include "GrClient.h"
#include "ITextSource.h"
#include "SimpleTextSrc.h"
#include "IGrEngine.h"
#include "IGrJustifier.h"
#include "GrJustifier.h"
#include "SegmentAux.h"
#include "Font.h"
// #include "WinFont.h"
#include "FileFont.h"
#include "Segment.h"
#include "SegmentPainter.h"
// #include "WinSegmentPainter.h"

#include "TestCase.h"
#include "RtTextSrc.h"


//:>********************************************************************************************
//:>	Functions
//:>********************************************************************************************
void RunTests(int numberOfTests, TestCase * ptcaseList);
int RunOneTestCase(TestCase * ptcase, Segment * psegPrev, Segment ** ppsegRet, RtTextSrc ** pptsrcRet);
void OutputError(TestCase * ptcase, std::string strErr, int i = -1);
void OutputErrorWithValues(TestCase * ptcase, std::string strErr, int i,
	int valueFound, int valueExpected);
void OutputErrorAux(TestCase * ptcase, std::string strErr, int i,
	bool showValues, int valueFound, int valueExpected);
bool WriteToLog(std::string str, int i = -1);
bool WriteToLog(std::string str, int i,
	bool showValues, int valueFound, int valueExpected);
bool WriteToLog(int n);

#endif //!WRCOMPILER_H