summaryrefslogtreecommitdiff
path: root/inputmethod/mozc-server/patches/patch-session_session__test.cc
blob: 8e37450b669640965c7a6d5a37a7792d79393219 (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
$NetBSD: patch-session_session__test.cc,v 1.4 2021/02/15 14:50:23 ryoon Exp $

* NetBSD support

--- session/session_test.cc.orig	2021-02-15 03:48:53.000000000 +0000
+++ session/session_test.cc
@@ -1974,11 +1974,11 @@ TEST_F(SessionTest, UpdatePreferences) {
   const size_t cascading_cand_size =
       command.output().candidates().candidate_size();
 
-#if defined(OS_LINUX) || defined(OS_ANDROID) || OS_WASM
+#if defined(OS_LINUX) || defined(OS_ANDROID) || OS_WASM || defined(OS_NETBSD)
   EXPECT_EQ(no_cascading_cand_size, cascading_cand_size);
-#else   // defined(OS_LINUX) || defined(OS_ANDROID) || OS_WASM
+#else   // defined(OS_LINUX) || defined(OS_ANDROID) || OS_WASM || defined(OS_NETBSD)
   EXPECT_GT(no_cascading_cand_size, cascading_cand_size);
-#endif  // defined(OS_LINUX) || defined(OS_ANDROID) || OS_WASM
+#endif  // defined(OS_LINUX) || defined(OS_ANDROID) || OS_WASM || defined(OS_NETBSD)
 
   command.Clear();
   session->ConvertCancel(&command);
@@ -2149,7 +2149,7 @@ TEST_F(SessionTest, OutputAllCandidateWo
 
     EXPECT_EQ(0, output.all_candidate_words().focused_index());
     EXPECT_EQ(commands::CONVERSION, output.all_candidate_words().category());
-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_WASM)
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_WASM) || defined(OS_NETBSD)
     // Cascading window is not supported on Linux, so the size of
     // candidate words is different from other platform.
     // TODO(komatsu): Modify the client for Linux to explicitly change
@@ -2159,13 +2159,13 @@ TEST_F(SessionTest, OutputAllCandidateWo
     //   "aiueo"  (t13n), "AIUEO" (t13n), "Aieuo" (t13n),
     //   "アイウエオ" (t13n) ]
     EXPECT_EQ(9, output.all_candidate_words().candidates_size());
-#else   // OS_LINUX || OS_ANDROID || OS_WASM
+#else   // OS_LINUX || OS_ANDROID || OS_WASM || OS_NETBSD
     // [ "あいうえお", "アイウエオ", "アイウエオ" (t13n), "あいうえお" (t13n),
     //   "aiueo" (t13n), "AIUEO" (t13n), "Aieuo" (t13n),
     //   "aiueo"  (t13n), "AIUEO" (t13n), "Aieuo" (t13n),
     //   "アイウエオ" (t13n) ]
     EXPECT_EQ(11, output.all_candidate_words().candidates_size());
-#endif  // OS_LINUX || OS_ANDROID || OS_WASM
+#endif  // OS_LINUX || OS_ANDROID || OS_WASM || OS_NETBSD
   }
 
   command.Clear();
@@ -2177,7 +2177,7 @@ TEST_F(SessionTest, OutputAllCandidateWo
 
     EXPECT_EQ(1, output.all_candidate_words().focused_index());
     EXPECT_EQ(commands::CONVERSION, output.all_candidate_words().category());
-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_WASM)
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_WASM) || defined(OS_NETBSD)
     // Cascading window is not supported on Linux, so the size of
     // candidate words is different from other platform.
     // TODO(komatsu): Modify the client for Linux to explicitly change
@@ -2187,13 +2187,13 @@ TEST_F(SessionTest, OutputAllCandidateWo
     //   "aiueo"  (t13n), "AIUEO" (t13n), "Aieuo" (t13n),
     //   "アイウエオ" (t13n) ]
     EXPECT_EQ(9, output.all_candidate_words().candidates_size());
-#else   // OS_LINUX || OS_ANDROID || OS_WASM
+#else   // OS_LINUX || OS_ANDROID || OS_WASM || OS_NETBSD
     // [ "あいうえお", "アイウエオ",
     //   "aiueo" (t13n), "AIUEO" (t13n), "Aieuo" (t13n),
     //   "aiueo"  (t13n), "AIUEO" (t13n), "Aieuo" (t13n),
     //   "アイウエオ" (t13n) ]
     EXPECT_EQ(11, output.all_candidate_words().candidates_size());
-#endif  // OS_LINUX || OS_ANDROID || OS_WASM
+#endif  // OS_LINUX || OS_ANDROID || OS_WASM || OS_NETBSD
   }
 }