Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Unified Diff: third_party/WebKit/Source/core/editing/state_machines/ForwardGraphemeBoundaryStateMachineTest.cpp

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/editing/state_machines/ForwardGraphemeBoundaryStateMachineTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/state_machines/ForwardGraphemeBoundaryStateMachineTest.cpp b/third_party/WebKit/Source/core/editing/state_machines/ForwardGraphemeBoundaryStateMachineTest.cpp
index f605faac99520a753610c533aed61d9e5216d58a..83ddfb4de71c16c1e7cd20db84e10fdea9cf05ef 100644
--- a/third_party/WebKit/Source/core/editing/state_machines/ForwardGraphemeBoundaryStateMachineTest.cpp
+++ b/third_party/WebKit/Source/core/editing/state_machines/ForwardGraphemeBoundaryStateMachineTest.cpp
@@ -61,12 +61,14 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest, PrecedingText) {
ForwardGraphemeBoundaryStateMachine machine;
// Preceding text should not affect the result except for flags.
// SOT + | + 'a' + 'a'
- EXPECT_EQ("SRF", processSequenceForward(&machine, asCodePoints(),
- asCodePoints('a', 'a')));
+ EXPECT_EQ(
+ "SRF",
+ processSequenceForward(&machine, asCodePoints(), asCodePoints('a', 'a')));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// SOT + [U] + | + 'a' + 'a'
- EXPECT_EQ("RRSRF", processSequenceForward(&machine, asCodePoints(kRisU),
- asCodePoints('a', 'a')));
+ EXPECT_EQ("RRSRF",
+ processSequenceForward(&machine, asCodePoints(kRisU),
+ asCodePoints('a', 'a')));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// SOT + [U] + [S] + | + 'a' + 'a'
EXPECT_EQ("RRRRSRF",
@@ -75,12 +77,14 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest, PrecedingText) {
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// U+0000 + | + 'a' + 'a'
- EXPECT_EQ("SRF", processSequenceForward(&machine, asCodePoints(0),
- asCodePoints('a', 'a')));
+ EXPECT_EQ("SRF",
+ processSequenceForward(&machine, asCodePoints(0),
+ asCodePoints('a', 'a')));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// U+0000 + [U] + | + 'a' + 'a'
- EXPECT_EQ("RRSRF", processSequenceForward(&machine, asCodePoints(0, kRisU),
- asCodePoints('a', 'a')));
+ EXPECT_EQ("RRSRF",
+ processSequenceForward(&machine, asCodePoints(0, kRisU),
+ asCodePoints('a', 'a')));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// U+0000 + [U] + [S] + | + 'a' + 'a'
EXPECT_EQ("RRRRSRF",
@@ -89,12 +93,14 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest, PrecedingText) {
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// 'a' + | + 'a' + 'a'
- EXPECT_EQ("SRF", processSequenceForward(&machine, asCodePoints('a'),
- asCodePoints('a', 'a')));
+ EXPECT_EQ("SRF",
+ processSequenceForward(&machine, asCodePoints('a'),
+ asCodePoints('a', 'a')));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// 'a' + [U] + | + 'a' + 'a'
- EXPECT_EQ("RRSRF", processSequenceForward(&machine, asCodePoints('a', kRisU),
- asCodePoints('a', 'a')));
+ EXPECT_EQ("RRSRF",
+ processSequenceForward(&machine, asCodePoints('a', kRisU),
+ asCodePoints('a', 'a')));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// 'a' + [U] + [S] + | + 'a' + 'a'
EXPECT_EQ("RRRRSRF",
@@ -103,8 +109,9 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest, PrecedingText) {
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// U+1F441 + | + 'a' + 'a'
- EXPECT_EQ("RSRF", processSequenceForward(&machine, asCodePoints(kEye),
- asCodePoints('a', 'a')));
+ EXPECT_EQ("RSRF",
+ processSequenceForward(&machine, asCodePoints(kEye),
+ asCodePoints('a', 'a')));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// U+1F441 + [U] + | + 'a' + 'a'
EXPECT_EQ("RRRSRF",
@@ -120,8 +127,9 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest, PrecedingText) {
// Broken surrogates in preceding text.
// [Lead] + | + 'a' + 'a'
- EXPECT_EQ("SRF", processSequenceForward(&machine, asCodePoints(kLead),
- asCodePoints('a', 'a')));
+ EXPECT_EQ("SRF",
+ processSequenceForward(&machine, asCodePoints(kLead),
+ asCodePoints('a', 'a')));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// [Lead] + [U] + | + 'a' + 'a'
EXPECT_EQ("RRSRF",
@@ -135,8 +143,9 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest, PrecedingText) {
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// 'a' + [Trail] + | + 'a' + 'a'
- EXPECT_EQ("RSRF", processSequenceForward(&machine, asCodePoints('a', kTrail),
- asCodePoints('a', 'a')));
+ EXPECT_EQ("RSRF",
+ processSequenceForward(&machine, asCodePoints('a', kTrail),
+ asCodePoints('a', 'a')));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// 'a' + [Trail] + [U] + | + 'a' + 'a'
EXPECT_EQ("RRRSRF",
@@ -144,9 +153,10 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest, PrecedingText) {
asCodePoints('a', 'a')));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// 'a' + [Trail] + [U] + [S] + | + 'a' + 'a'
- EXPECT_EQ("RRRRRSRF", processSequenceForward(
- &machine, asCodePoints('a', kTrail, kRisU, kRisS),
- asCodePoints('a', 'a')));
+ EXPECT_EQ(
+ "RRRRRSRF",
+ processSequenceForward(&machine, asCodePoints('a', kTrail, kRisU, kRisS),
+ asCodePoints('a', 'a')));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// [Trail] + [Trail] + | + 'a' + 'a'
@@ -155,9 +165,10 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest, PrecedingText) {
asCodePoints('a', 'a')));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// [Trail] + [Trail] + [U] + | + 'a' + 'a'
- EXPECT_EQ("RRRSRF", processSequenceForward(
- &machine, asCodePoints(kTrail, kTrail, kRisU),
- asCodePoints('a', 'a')));
+ EXPECT_EQ(
+ "RRRSRF",
+ processSequenceForward(&machine, asCodePoints(kTrail, kTrail, kRisU),
+ asCodePoints('a', 'a')));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// [Trail] + [Trail] + [U] + [S] + | + 'a' + 'a'
EXPECT_EQ("RRRRRSRF",
@@ -167,8 +178,9 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest, PrecedingText) {
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// SOT + [Trail] + | + 'a' + 'a'
- EXPECT_EQ("RSRF", processSequenceForward(&machine, asCodePoints(kTrail),
- asCodePoints('a', 'a')));
+ EXPECT_EQ("RSRF",
+ processSequenceForward(&machine, asCodePoints(kTrail),
+ asCodePoints('a', 'a')));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// SOT + [Trail] + [U] + | + 'a' + 'a'
EXPECT_EQ("RRRSRF",
@@ -185,20 +197,24 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest, PrecedingText) {
TEST_F(ForwardGraphemeBoundaryStatemachineTest, BrokenSurrogatePair) {
ForwardGraphemeBoundaryStateMachine machine;
// SOT + | + [Trail]
- EXPECT_EQ("SF", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(kTrail)));
+ EXPECT_EQ(
+ "SF",
+ processSequenceForward(&machine, asCodePoints(), asCodePoints(kTrail)));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// SOT + | + [Lead] + 'a'
- EXPECT_EQ("SRF", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(kLead, 'a')));
+ EXPECT_EQ("SRF",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints(kLead, 'a')));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// SOT + | + [Lead] + [Lead]
- EXPECT_EQ("SRF", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(kLead, kLead)));
+ EXPECT_EQ("SRF",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints(kLead, kLead)));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// SOT + | + [Lead] + EOT
- EXPECT_EQ("SR", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(kLead)));
+ EXPECT_EQ(
+ "SR",
+ processSequenceForward(&machine, asCodePoints(), asCodePoints(kLead)));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
}
@@ -206,43 +222,51 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest, BreakImmediately_BMP) {
ForwardGraphemeBoundaryStateMachine machine;
// SOT + | + U+0000 + U+0000
- EXPECT_EQ("SRF", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(0, 0)));
+ EXPECT_EQ(
+ "SRF",
+ processSequenceForward(&machine, asCodePoints(), asCodePoints(0, 0)));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// SOT + | + 'a' + 'a'
- EXPECT_EQ("SRF", processSequenceForward(&machine, asCodePoints(),
- asCodePoints('a', 'a')));
+ EXPECT_EQ(
+ "SRF",
+ processSequenceForward(&machine, asCodePoints(), asCodePoints('a', 'a')));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// SOT + | + 'a' + U+1F441
- EXPECT_EQ("SRRF", processSequenceForward(&machine, asCodePoints(),
- asCodePoints('a', kEye)));
+ EXPECT_EQ("SRRF",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints('a', kEye)));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// SOT + | + 'a' + EOT
- EXPECT_EQ("SR", processSequenceForward(&machine, asCodePoints(),
- asCodePoints('a')));
+ EXPECT_EQ(
+ "SR",
+ processSequenceForward(&machine, asCodePoints(), asCodePoints('a')));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// SOT + | + 'a' + [Trail]
- EXPECT_EQ("SRF", processSequenceForward(&machine, asCodePoints(),
- asCodePoints('a', kTrail)));
+ EXPECT_EQ("SRF",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints('a', kTrail)));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// SOT + | + 'a' + [Lead] + 'a'
- EXPECT_EQ("SRRF", processSequenceForward(&machine, asCodePoints(),
- asCodePoints('a', kLead, 'a')));
+ EXPECT_EQ("SRRF",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints('a', kLead, 'a')));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// SOT + | + 'a' + [Lead] + [Lead]
- EXPECT_EQ("SRRF", processSequenceForward(&machine, asCodePoints(),
- asCodePoints('a', kLead, kLead)));
+ EXPECT_EQ("SRRF",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints('a', kLead, kLead)));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
// SOT + | + 'a' + [Lead] + EOT
- EXPECT_EQ("SRR", processSequenceForward(&machine, asCodePoints(),
- asCodePoints('a', kLead)));
+ EXPECT_EQ("SRR",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints('a', kLead)));
EXPECT_EQ(1, machine.finalizeAndGetBoundaryOffset());
}
@@ -251,38 +275,45 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest,
ForwardGraphemeBoundaryStateMachine machine;
// SOT + | + U+1F441 + 'a'
- EXPECT_EQ("SRRF", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(kEye, 'a')));
+ EXPECT_EQ("SRRF",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints(kEye, 'a')));
EXPECT_EQ(2, machine.finalizeAndGetBoundaryOffset());
// SOT + | + U+1F441 + U+1F441
- EXPECT_EQ("SRRRF", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(kEye, kEye)));
+ EXPECT_EQ("SRRRF",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints(kEye, kEye)));
EXPECT_EQ(2, machine.finalizeAndGetBoundaryOffset());
// SOT + | + U+1F441 + EOT
- EXPECT_EQ("SRR", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(kEye)));
+ EXPECT_EQ(
+ "SRR",
+ processSequenceForward(&machine, asCodePoints(), asCodePoints(kEye)));
EXPECT_EQ(2, machine.finalizeAndGetBoundaryOffset());
// SOT + | + U+1F441 + [Trail]
- EXPECT_EQ("SRRF", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(kEye, kTrail)));
+ EXPECT_EQ("SRRF",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints(kEye, kTrail)));
EXPECT_EQ(2, machine.finalizeAndGetBoundaryOffset());
// SOT + | + U+1F441 + [Lead] + 'a'
- EXPECT_EQ("SRRRF", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(kEye, kLead, 'a')));
+ EXPECT_EQ("SRRRF",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints(kEye, kLead, 'a')));
EXPECT_EQ(2, machine.finalizeAndGetBoundaryOffset());
// SOT + | + U+1F441 + [Lead] + [Lead]
- EXPECT_EQ("SRRRF", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(kEye, kLead, kLead)));
+ EXPECT_EQ("SRRRF",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints(kEye, kLead, kLead)));
EXPECT_EQ(2, machine.finalizeAndGetBoundaryOffset());
// SOT + | + U+1F441 + [Lead] + EOT
- EXPECT_EQ("SRRR", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(kEye, kLead)));
+ EXPECT_EQ("SRRR",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints(kEye, kLead)));
EXPECT_EQ(2, machine.finalizeAndGetBoundaryOffset());
}
@@ -291,18 +322,21 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest,
ForwardGraphemeBoundaryStateMachine machine;
// SOT + | + U+231A + U+FE0F + 'a'
- EXPECT_EQ("SRRF", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(kWatch, kVS16, 'a')));
+ EXPECT_EQ("SRRF",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints(kWatch, kVS16, 'a')));
EXPECT_EQ(2, machine.finalizeAndGetBoundaryOffset());
// SOT + | + U+231A + U+FE0F + U+1F441
- EXPECT_EQ("SRRRF", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(kWatch, kVS16, kEye)));
+ EXPECT_EQ("SRRRF",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints(kWatch, kVS16, kEye)));
EXPECT_EQ(2, machine.finalizeAndGetBoundaryOffset());
// SOT + | + U+231A + U+FE0F + EOT
- EXPECT_EQ("SRR", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(kWatch, kVS16)));
+ EXPECT_EQ("SRR",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints(kWatch, kVS16)));
EXPECT_EQ(2, machine.finalizeAndGetBoundaryOffset());
// SOT + | + U+231A + U+FE0F + [Trail]
@@ -324,8 +358,9 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest,
EXPECT_EQ(2, machine.finalizeAndGetBoundaryOffset());
// SOT + | + U+231A + U+FE0F + [Lead] + EOT
- EXPECT_EQ("SRRR", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(kWatch, kVS16, kLead)));
+ EXPECT_EQ("SRRR",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints(kWatch, kVS16, kLead)));
EXPECT_EQ(2, machine.finalizeAndGetBoundaryOffset());
}
@@ -334,23 +369,27 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest,
ForwardGraphemeBoundaryStateMachine machine;
// SOT + | + U+1F441 + U+FE0F + 'a'
- EXPECT_EQ("SRRRF", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(kEye, kVS16, 'a')));
+ EXPECT_EQ("SRRRF",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints(kEye, kVS16, 'a')));
EXPECT_EQ(3, machine.finalizeAndGetBoundaryOffset());
// SOT + | + U+1F441 + U+FE0F + U+1F441
- EXPECT_EQ("SRRRRF", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(kEye, kVS16, kEye)));
+ EXPECT_EQ("SRRRRF",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints(kEye, kVS16, kEye)));
EXPECT_EQ(3, machine.finalizeAndGetBoundaryOffset());
// SOT + | + U+1F441 + U+FE0F + EOT
- EXPECT_EQ("SRRR", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(kEye, kVS16)));
+ EXPECT_EQ("SRRR",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints(kEye, kVS16)));
EXPECT_EQ(3, machine.finalizeAndGetBoundaryOffset());
// SOT + | + U+1F441 + U+FE0F + [Trail]
- EXPECT_EQ("SRRRF", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(kEye, kVS16, kTrail)));
+ EXPECT_EQ("SRRRF",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints(kEye, kVS16, kTrail)));
EXPECT_EQ(3, machine.finalizeAndGetBoundaryOffset());
// SOT + | + U+1F441 + U+FE0F + [Lead] + 'a'
@@ -366,8 +405,9 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest,
EXPECT_EQ(3, machine.finalizeAndGetBoundaryOffset());
// SOT + | + U+1F441 + U+FE0F + [Lead] + EOT
- EXPECT_EQ("SRRRR", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(kEye, kVS16, kLead)));
+ EXPECT_EQ("SRRRR",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints(kEye, kVS16, kLead)));
EXPECT_EQ(3, machine.finalizeAndGetBoundaryOffset());
}
@@ -376,8 +416,9 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest,
ForwardGraphemeBoundaryStateMachine machine;
// SOT + | + U+845B + U+E0100 + 'a'
- EXPECT_EQ("SRRRF", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(kHanBMP, kVS17, 'a')));
+ EXPECT_EQ("SRRRF",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints(kHanBMP, kVS17, 'a')));
EXPECT_EQ(3, machine.finalizeAndGetBoundaryOffset());
// SOT + | + U+845B + U+E0100 + U+1F441
@@ -387,8 +428,9 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest,
EXPECT_EQ(3, machine.finalizeAndGetBoundaryOffset());
// SOT + | + U+845B + U+E0100 + EOT
- EXPECT_EQ("SRRR", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(kHanBMP, kVS17)));
+ EXPECT_EQ("SRRR",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints(kHanBMP, kVS17)));
EXPECT_EQ(3, machine.finalizeAndGetBoundaryOffset());
// SOT + | + U+845B + U+E0100 + [Trail]
@@ -433,8 +475,9 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest,
EXPECT_EQ(4, machine.finalizeAndGetBoundaryOffset());
// SOT + | + U+20000 + U+E0100 + EOT
- EXPECT_EQ("SRRRR", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(kHanSIP, kVS17)));
+ EXPECT_EQ("SRRRR",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints(kHanSIP, kVS17)));
EXPECT_EQ(4, machine.finalizeAndGetBoundaryOffset());
// SOT + | + U+20000 + U+E0100 + [Trail]
@@ -501,10 +544,11 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest, MuchLongerCase) {
EXPECT_EQ(11, machine.finalizeAndGetBoundaryOffset());
// SOT + | + ZWJ Emoji Sequence + [Lead] + 'a'
- EXPECT_EQ("SRRRRRRRRRRRRF", processSequenceForward(
- &machine, asCodePoints(),
- asCodePoints(kMan, kZwj, kHeart, kVS16, kZwj,
- kKiss, kZwj, kMan, kLead, 'a')));
+ EXPECT_EQ(
+ "SRRRRRRRRRRRRF",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints(kMan, kZwj, kHeart, kVS16, kZwj,
+ kKiss, kZwj, kMan, kLead, 'a')));
EXPECT_EQ(11, machine.finalizeAndGetBoundaryOffset());
// SOT + | + ZWJ Emoji Sequence + [Lead] + [Lead]
@@ -584,23 +628,27 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest, singleFlags) {
ForwardGraphemeBoundaryStateMachine machine;
// SOT + | + [U] + [S]
- EXPECT_EQ("SRRRF", processSequenceForward(&machine, asCodePoints(),
- asCodePoints(kRisU, kRisS)));
+ EXPECT_EQ("SRRRF",
+ processSequenceForward(&machine, asCodePoints(),
+ asCodePoints(kRisU, kRisS)));
EXPECT_EQ(4, machine.finalizeAndGetBoundaryOffset());
// 'a' + | + [U] + [S]
- EXPECT_EQ("SRRRF", processSequenceForward(&machine, asCodePoints('a'),
- asCodePoints(kRisU, kRisS)));
+ EXPECT_EQ("SRRRF",
+ processSequenceForward(&machine, asCodePoints('a'),
+ asCodePoints(kRisU, kRisS)));
EXPECT_EQ(4, machine.finalizeAndGetBoundaryOffset());
// U+1F441 + | + [U] + [S]
- EXPECT_EQ("RSRRRF", processSequenceForward(&machine, asCodePoints(kEye),
- asCodePoints(kRisU, kRisS)));
+ EXPECT_EQ("RSRRRF",
+ processSequenceForward(&machine, asCodePoints(kEye),
+ asCodePoints(kRisU, kRisS)));
EXPECT_EQ(4, machine.finalizeAndGetBoundaryOffset());
// [Lead] + | + [U] + [S]
- EXPECT_EQ("SRRRF", processSequenceForward(&machine, asCodePoints(kLead),
- asCodePoints(kRisU, kRisS)));
+ EXPECT_EQ("SRRRF",
+ processSequenceForward(&machine, asCodePoints(kLead),
+ asCodePoints(kRisU, kRisS)));
EXPECT_EQ(4, machine.finalizeAndGetBoundaryOffset());
// 'a' + [Trail] + | + [U] + [S]
@@ -616,8 +664,9 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest, singleFlags) {
EXPECT_EQ(4, machine.finalizeAndGetBoundaryOffset());
// SOT + [Trail] + | + [U] + [S]
- EXPECT_EQ("RSRRRF", processSequenceForward(&machine, asCodePoints(kTrail),
- asCodePoints(kRisU, kRisS)));
+ EXPECT_EQ("RSRRRF",
+ processSequenceForward(&machine, asCodePoints(kTrail),
+ asCodePoints(kRisU, kRisS)));
EXPECT_EQ(4, machine.finalizeAndGetBoundaryOffset());
}
@@ -649,9 +698,10 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest, twoFlags) {
EXPECT_EQ(4, machine.finalizeAndGetBoundaryOffset());
// 'a' + [Trail] + [U] + [S] + | + [U] + [S]
- EXPECT_EQ("RRRRRSRRRF", processSequenceForward(
- &machine, asCodePoints('a', kTrail, kRisU, kRisS),
- asCodePoints(kRisU, kRisS)));
+ EXPECT_EQ(
+ "RRRRRSRRRF",
+ processSequenceForward(&machine, asCodePoints('a', kTrail, kRisU, kRisS),
+ asCodePoints(kRisU, kRisS)));
EXPECT_EQ(4, machine.finalizeAndGetBoundaryOffset());
// [Trail] + [Trail] + [U] + [S] + | + [U] + [S]
@@ -672,8 +722,9 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest, oddNumberedFlags) {
ForwardGraphemeBoundaryStateMachine machine;
// SOT + [U] + | + [S] + [S]
- EXPECT_EQ("RRSRRRF", processSequenceForward(&machine, asCodePoints(kRisU),
- asCodePoints(kRisS, kRisU)));
+ EXPECT_EQ("RRSRRRF",
+ processSequenceForward(&machine, asCodePoints(kRisU),
+ asCodePoints(kRisS, kRisU)));
EXPECT_EQ(2, machine.finalizeAndGetBoundaryOffset());
// 'a' + [U] + | + [S] + [S]
@@ -701,9 +752,10 @@ TEST_F(ForwardGraphemeBoundaryStatemachineTest, oddNumberedFlags) {
EXPECT_EQ(2, machine.finalizeAndGetBoundaryOffset());
// [Trail] + [Trail] + [U] + | + [S] + [S]
- EXPECT_EQ("RRRSRRRF", processSequenceForward(
- &machine, asCodePoints(kTrail, kTrail, kRisU),
- asCodePoints(kRisS, kRisU)));
+ EXPECT_EQ(
+ "RRRSRRRF",
+ processSequenceForward(&machine, asCodePoints(kTrail, kTrail, kRisU),
+ asCodePoints(kRisS, kRisU)));
EXPECT_EQ(2, machine.finalizeAndGetBoundaryOffset());
// SOT + [Trail] + [U] + | + [S] + [S]

Powered by Google App Engine
This is Rietveld 408576698