1
- #include " tesseract/training/normstrngs.h"
1
+ // (C) Copyright 2017, Google Inc.
2
+ // Licensed under the Apache License, Version 2.0 (the "License");
3
+ // you may not use this file except in compliance with the License.
4
+ // You may obtain a copy of the License at
5
+ // http://www.apache.org/licenses/LICENSE-2.0
6
+ // Unless required by applicable law or agreed to in writing, software
7
+ // distributed under the License is distributed on an "AS IS" BASIS,
8
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ // See the License for the specific language governing permissions and
10
+ // limitations under the License.
2
11
3
- #include " tesseract/unittest/normstrngs_test.h"
12
+ #include " include_gunit.h"
13
+ #include " normstrngs.h"
14
+ #include " normstrngs_test.h"
4
15
5
16
namespace tesseract {
6
17
namespace {
7
18
8
19
// Test some random Khmer words.
9
20
TEST (ValidateKhmerTest, GoodKhmerWords) {
10
- string str = " ព័ត៏មានប្លែកៗ" ;
21
+ std:: string str = " ព័ត៏មានប្លែកៗ" ;
11
22
ExpectGraphemeModeResults (str, UnicodeNormMode::kNFC , 13 , 12 , 7 , str);
12
23
str = " ទំនុកច្រៀង" ;
13
24
ExpectGraphemeModeResults (str, UnicodeNormMode::kNFC , 10 , 9 , 5 , str);
@@ -19,9 +30,9 @@ TEST(ValidateKhmerTest, GoodKhmerWords) {
19
30
20
31
// Test some random Khmer words with dotted circles.
21
32
TEST (ValidateKhmerTest, BadKhmerWords) {
22
- string result;
33
+ std:: string result;
23
34
// Multiple dependent vowels not allowed
24
- string str = " \u1796\u17b6\u17b7 " ;
35
+ std:: string str = " \u1796\u17b6\u17b7 " ;
25
36
EXPECT_FALSE (NormalizeUTF8String (UnicodeNormMode::kNFC , OCRNorm::kNone ,
26
37
GraphemeNorm::kNormalize , str.c_str (),
27
38
&result));
0 commit comments