summaryrefslogtreecommitdiff
path: root/Build/source/libs/graphite/engine-2.3.1/test/RegressionTest/main.h
blob: bd92d0d5b3010c52125b6d0aecc028cbaefbb651 (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
/*--------------------------------------------------------------------*//*: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

// To allow call to IsDebuggerPresent:
#define _WIN32_WINNT WINVER

//:>********************************************************************************************
//:>	Include files
//:>********************************************************************************************
// #include "windows.h"
#include "stdafx.h"
////#include "resource.h"
// #include <hash_map>
#include <fstream>
#include <iostream>
#include <vector>
////#include <algorithm>
#include <string>
#include <cstring>
#ifdef _WIN32
#include <crtdbg.h>
#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