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

Unified Diff: third_party/WebKit/Source/core/editing/state_machines/BackwardGraphemeBoundaryStateMachineTest.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/BackwardGraphemeBoundaryStateMachineTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/state_machines/BackwardGraphemeBoundaryStateMachineTest.cpp b/third_party/WebKit/Source/core/editing/state_machines/BackwardGraphemeBoundaryStateMachineTest.cpp
index e715076deb548c16789dc3c37199d30507b03d1b..a5761fb94e8fedd719a93a7366b06b27d3042a2f 100644
--- a/third_party/WebKit/Source/core/editing/state_machines/BackwardGraphemeBoundaryStateMachineTest.cpp
+++ b/third_party/WebKit/Source/core/editing/state_machines/BackwardGraphemeBoundaryStateMachineTest.cpp
@@ -105,8 +105,9 @@ TEST_F(BackwardGraphemeBoundaryStatemachineTest, BreakImmediately_BMP) {
EXPECT_EQ(-1, machine.finalizeAndGetBoundaryOffset());
// [Trail] + [Trail] + 'a'
- EXPECT_EQ("RRF", processSequenceBackward(&machine,
- asCodePoints(kTrail, kTrail, 'a')));
+ EXPECT_EQ(
+ "RRF",
+ processSequenceBackward(&machine, asCodePoints(kTrail, kTrail, 'a')));
EXPECT_EQ(-1, machine.finalizeAndGetBoundaryOffset());
// SOT + [Trail] + 'a'
@@ -144,8 +145,9 @@ TEST_F(BackwardGraphemeBoundaryStatemachineTest,
EXPECT_EQ(-2, machine.finalizeAndGetBoundaryOffset());
// [Trail] + [Trail] + U+1F441
- EXPECT_EQ("RRRF", processSequenceBackward(
- &machine, asCodePoints(kTrail, kTrail, kEye)));
+ EXPECT_EQ(
+ "RRRF",
+ processSequenceBackward(&machine, asCodePoints(kTrail, kTrail, kEye)));
EXPECT_EQ(-2, machine.finalizeAndGetBoundaryOffset());
// SOT + [Trail] + U+1F441
@@ -159,13 +161,15 @@ TEST_F(BackwardGraphemeBoundaryStatemachineTest,
BackwardGraphemeBoundaryStateMachine machine;
// 'a' + U+231A + U+FE0F
- EXPECT_EQ("RRF", processSequenceBackward(&machine,
- asCodePoints('a', kWatch, kVS16)));
+ EXPECT_EQ(
+ "RRF",
+ processSequenceBackward(&machine, asCodePoints('a', kWatch, kVS16)));
EXPECT_EQ(-2, machine.finalizeAndGetBoundaryOffset());
// U+1F441 + U+231A + U+FE0F
- EXPECT_EQ("RRRF", processSequenceBackward(&machine,
- asCodePoints(kEye, kWatch, kVS16)));
+ EXPECT_EQ(
+ "RRRF",
+ processSequenceBackward(&machine, asCodePoints(kEye, kWatch, kVS16)));
EXPECT_EQ(-2, machine.finalizeAndGetBoundaryOffset());
// SOT + U+231A + U+FE0F
@@ -174,23 +178,27 @@ TEST_F(BackwardGraphemeBoundaryStatemachineTest,
EXPECT_EQ(-2, machine.finalizeAndGetBoundaryOffset());
// [Lead] + U+231A + U+FE0F
- EXPECT_EQ("RRF", processSequenceBackward(&machine,
- asCodePoints(kLead, kWatch, kVS16)));
+ EXPECT_EQ(
+ "RRF",
+ processSequenceBackward(&machine, asCodePoints(kLead, kWatch, kVS16)));
EXPECT_EQ(-2, machine.finalizeAndGetBoundaryOffset());
// 'a' + [Trail] + U+231A + U+FE0F
- EXPECT_EQ("RRRF", processSequenceBackward(
- &machine, asCodePoints('a', kTrail, kWatch, kVS16)));
+ EXPECT_EQ("RRRF",
+ processSequenceBackward(&machine,
+ asCodePoints('a', kTrail, kWatch, kVS16)));
EXPECT_EQ(-2, machine.finalizeAndGetBoundaryOffset());
// [Trail] + [Trail] + U+231A + U+FE0F
- EXPECT_EQ("RRRF", processSequenceBackward(
- &machine, asCodePoints(kTrail, kTrail, kWatch, kVS16)));
+ EXPECT_EQ("RRRF",
+ processSequenceBackward(
+ &machine, asCodePoints(kTrail, kTrail, kWatch, kVS16)));
EXPECT_EQ(-2, machine.finalizeAndGetBoundaryOffset());
// SOT + [Trail] + U+231A + U+FE0F
- EXPECT_EQ("RRRF", processSequenceBackward(
- &machine, asCodePoints(kTrail, kWatch, kVS16)));
+ EXPECT_EQ(
+ "RRRF",
+ processSequenceBackward(&machine, asCodePoints(kTrail, kWatch, kVS16)));
EXPECT_EQ(-2, machine.finalizeAndGetBoundaryOffset());
}
@@ -214,23 +222,27 @@ TEST_F(BackwardGraphemeBoundaryStatemachineTest,
EXPECT_EQ(-3, machine.finalizeAndGetBoundaryOffset());
// [Lead] + U+1F441 + U+FE0F
- EXPECT_EQ("RRRF", processSequenceBackward(&machine,
- asCodePoints(kLead, kEye, kVS16)));
+ EXPECT_EQ(
+ "RRRF",
+ processSequenceBackward(&machine, asCodePoints(kLead, kEye, kVS16)));
EXPECT_EQ(-3, machine.finalizeAndGetBoundaryOffset());
// 'a' + [Trail] + U+1F441 + U+FE0F
- EXPECT_EQ("RRRRF", processSequenceBackward(
- &machine, asCodePoints('a', kTrail, kEye, kVS16)));
+ EXPECT_EQ("RRRRF",
+ processSequenceBackward(&machine,
+ asCodePoints('a', kTrail, kEye, kVS16)));
EXPECT_EQ(-3, machine.finalizeAndGetBoundaryOffset());
// [Trail] + [Trail] + U+1F441 + U+FE0F
- EXPECT_EQ("RRRRF", processSequenceBackward(
- &machine, asCodePoints(kTrail, kTrail, kEye, kVS16)));
+ EXPECT_EQ("RRRRF",
+ processSequenceBackward(&machine,
+ asCodePoints(kTrail, kTrail, kEye, kVS16)));
EXPECT_EQ(-3, machine.finalizeAndGetBoundaryOffset());
// SOT + [Trail] + U+1F441 + U+FE0F
- EXPECT_EQ("RRRRF", processSequenceBackward(
- &machine, asCodePoints(kTrail, kEye, kVS16)));
+ EXPECT_EQ(
+ "RRRRF",
+ processSequenceBackward(&machine, asCodePoints(kTrail, kEye, kVS16)));
EXPECT_EQ(-3, machine.finalizeAndGetBoundaryOffset());
}
@@ -239,13 +251,15 @@ TEST_F(BackwardGraphemeBoundaryStatemachineTest,
BackwardGraphemeBoundaryStateMachine machine;
// 'a' + U+845B + U+E0100
- EXPECT_EQ("RRRF", processSequenceBackward(&machine,
- asCodePoints('a', kHanBMP, kVS17)));
+ EXPECT_EQ(
+ "RRRF",
+ processSequenceBackward(&machine, asCodePoints('a', kHanBMP, kVS17)));
EXPECT_EQ(-3, machine.finalizeAndGetBoundaryOffset());
// U+1F441 + U+845B + U+E0100
- EXPECT_EQ("RRRRF", processSequenceBackward(
- &machine, asCodePoints(kEye, kHanBMP, kVS17)));
+ EXPECT_EQ(
+ "RRRRF",
+ processSequenceBackward(&machine, asCodePoints(kEye, kHanBMP, kVS17)));
EXPECT_EQ(-3, machine.finalizeAndGetBoundaryOffset());
// SOT + U+845B + U+E0100
@@ -254,13 +268,15 @@ TEST_F(BackwardGraphemeBoundaryStatemachineTest,
EXPECT_EQ(-3, machine.finalizeAndGetBoundaryOffset());
// [Lead] + U+845B + U+E0100
- EXPECT_EQ("RRRF", processSequenceBackward(
- &machine, asCodePoints(kLead, kHanBMP, kVS17)));
+ EXPECT_EQ(
+ "RRRF",
+ processSequenceBackward(&machine, asCodePoints(kLead, kHanBMP, kVS17)));
EXPECT_EQ(-3, machine.finalizeAndGetBoundaryOffset());
// 'a' + [Trail] + U+845B + U+E0100
- EXPECT_EQ("RRRRF", processSequenceBackward(
- &machine, asCodePoints('a', kTrail, kHanBMP, kVS17)));
+ EXPECT_EQ("RRRRF",
+ processSequenceBackward(&machine,
+ asCodePoints('a', kTrail, kHanBMP, kVS17)));
EXPECT_EQ(-3, machine.finalizeAndGetBoundaryOffset());
// [Trail] + [Trail] + U+845B + U+E0100
@@ -270,8 +286,9 @@ TEST_F(BackwardGraphemeBoundaryStatemachineTest,
EXPECT_EQ(-3, machine.finalizeAndGetBoundaryOffset());
// SOT + [Trail] + U+845B + U+E0100
- EXPECT_EQ("RRRRF", processSequenceBackward(
- &machine, asCodePoints(kTrail, kHanBMP, kVS17)));
+ EXPECT_EQ(
+ "RRRRF",
+ processSequenceBackward(&machine, asCodePoints(kTrail, kHanBMP, kVS17)));
EXPECT_EQ(-3, machine.finalizeAndGetBoundaryOffset());
}
@@ -280,13 +297,15 @@ TEST_F(BackwardGraphemeBoundaryStatemachineTest,
BackwardGraphemeBoundaryStateMachine machine;
// 'a' + U+20000 + U+E0100
- EXPECT_EQ("RRRRF", processSequenceBackward(
- &machine, asCodePoints('a', kHanSIP, kVS17)));
+ EXPECT_EQ(
+ "RRRRF",
+ processSequenceBackward(&machine, asCodePoints('a', kHanSIP, kVS17)));
EXPECT_EQ(-4, machine.finalizeAndGetBoundaryOffset());
// U+1F441 + U+20000 + U+E0100
- EXPECT_EQ("RRRRRF", processSequenceBackward(
- &machine, asCodePoints(kEye, kHanSIP, kVS17)));
+ EXPECT_EQ(
+ "RRRRRF",
+ processSequenceBackward(&machine, asCodePoints(kEye, kHanSIP, kVS17)));
EXPECT_EQ(-4, machine.finalizeAndGetBoundaryOffset());
// SOT + U+20000 + U+E0100
@@ -295,13 +314,15 @@ TEST_F(BackwardGraphemeBoundaryStatemachineTest,
EXPECT_EQ(-4, machine.finalizeAndGetBoundaryOffset());
// [Lead] + U+20000 + U+E0100
- EXPECT_EQ("RRRRF", processSequenceBackward(
- &machine, asCodePoints(kLead, kHanSIP, kVS17)));
+ EXPECT_EQ(
+ "RRRRF",
+ processSequenceBackward(&machine, asCodePoints(kLead, kHanSIP, kVS17)));
EXPECT_EQ(-4, machine.finalizeAndGetBoundaryOffset());
// 'a' + [Trail] + U+20000 + U+E0100
- EXPECT_EQ("RRRRRF", processSequenceBackward(
- &machine, asCodePoints('a', kTrail, kHanSIP, kVS17)));
+ EXPECT_EQ("RRRRRF",
+ processSequenceBackward(&machine,
+ asCodePoints('a', kTrail, kHanSIP, kVS17)));
EXPECT_EQ(-4, machine.finalizeAndGetBoundaryOffset());
// [Trail] + [Trail] + U+20000 + U+E0100
@@ -311,8 +332,9 @@ TEST_F(BackwardGraphemeBoundaryStatemachineTest,
EXPECT_EQ(-4, machine.finalizeAndGetBoundaryOffset());
// SOT + [Trail] + U+20000 + U+E0100
- EXPECT_EQ("RRRRRF", processSequenceBackward(
- &machine, asCodePoints(kTrail, kHanSIP, kVS17)));
+ EXPECT_EQ(
+ "RRRRRF",
+ processSequenceBackward(&machine, asCodePoints(kTrail, kHanSIP, kVS17)));
EXPECT_EQ(-4, machine.finalizeAndGetBoundaryOffset());
}
@@ -328,51 +350,56 @@ TEST_F(BackwardGraphemeBoundaryStatemachineTest, MuchLongerCase) {
// emoji sequence.
// 'a' + ZWJ Emoji Sequence
EXPECT_EQ("RRRRRRRRRRRF",
- processSequenceBackward(
- &machine, asCodePoints('a', kMan, kZwj, kHeart, kVS16, kZwj,
- kKiss, kZwj, kMan)));
+ processSequenceBackward(&machine,
+ asCodePoints('a', kMan, kZwj, kHeart, kVS16,
+ kZwj, kKiss, kZwj, kMan)));
EXPECT_EQ(-11, machine.finalizeAndGetBoundaryOffset());
// U+1F441 + ZWJ Emoji Sequence
- EXPECT_EQ("RRRRRRRRRRRRF",
- processSequenceBackward(
- &machine, asCodePoints(kEye, kMan, kZwj, kHeart, kVS16, kZwj,
- kKiss, kZwj, kMan)));
+ EXPECT_EQ(
+ "RRRRRRRRRRRRF",
+ processSequenceBackward(&machine,
+ asCodePoints(kEye, kMan, kZwj, kHeart, kVS16,
+ kZwj, kKiss, kZwj, kMan)));
EXPECT_EQ(-11, machine.finalizeAndGetBoundaryOffset());
// SOT + ZWJ Emoji Sequence
- EXPECT_EQ(
- "RRRRRRRRRRRF",
- processSequenceBackward(&machine, asCodePoints(kMan, kZwj, kHeart, kVS16,
- kZwj, kKiss, kZwj, kMan)));
+ EXPECT_EQ("RRRRRRRRRRRF",
+ processSequenceBackward(&machine,
+ asCodePoints(kMan, kZwj, kHeart, kVS16,
+ kZwj, kKiss, kZwj, kMan)));
EXPECT_EQ(-11, machine.finalizeAndGetBoundaryOffset());
// [Lead] + ZWJ Emoji Sequence
- EXPECT_EQ("RRRRRRRRRRRF",
- processSequenceBackward(
- &machine, asCodePoints(kLead, kMan, kZwj, kHeart, kVS16, kZwj,
- kKiss, kZwj, kMan)));
+ EXPECT_EQ(
+ "RRRRRRRRRRRF",
+ processSequenceBackward(&machine,
+ asCodePoints(kLead, kMan, kZwj, kHeart, kVS16,
+ kZwj, kKiss, kZwj, kMan)));
EXPECT_EQ(-11, machine.finalizeAndGetBoundaryOffset());
// 'a' + [Trail] + ZWJ Emoji Sequence
- EXPECT_EQ("RRRRRRRRRRRRF",
- processSequenceBackward(
- &machine, asCodePoints('a', kTrail, kMan, kZwj, kHeart, kVS16,
- kZwj, kKiss, kZwj, kMan)));
+ EXPECT_EQ(
+ "RRRRRRRRRRRRF",
+ processSequenceBackward(&machine,
+ asCodePoints('a', kTrail, kMan, kZwj, kHeart,
+ kVS16, kZwj, kKiss, kZwj, kMan)));
EXPECT_EQ(-11, machine.finalizeAndGetBoundaryOffset());
// [Trail] + [Trail] + ZWJ Emoji Sequence
- EXPECT_EQ("RRRRRRRRRRRRF",
- processSequenceBackward(
- &machine, asCodePoints(kTrail, kTrail, kMan, kZwj, kHeart,
- kVS16, kZwj, kKiss, kZwj, kMan)));
+ EXPECT_EQ(
+ "RRRRRRRRRRRRF",
+ processSequenceBackward(&machine,
+ asCodePoints(kTrail, kTrail, kMan, kZwj, kHeart,
+ kVS16, kZwj, kKiss, kZwj, kMan)));
EXPECT_EQ(-11, machine.finalizeAndGetBoundaryOffset());
// SOT + [Trail] + ZWJ Emoji Sequence
- EXPECT_EQ("RRRRRRRRRRRRF",
- processSequenceBackward(
- &machine, asCodePoints(kTrail, kMan, kZwj, kHeart, kVS16, kZwj,
- kKiss, kZwj, kMan)));
+ EXPECT_EQ(
+ "RRRRRRRRRRRRF",
+ processSequenceBackward(&machine,
+ asCodePoints(kTrail, kMan, kZwj, kHeart, kVS16,
+ kZwj, kKiss, kZwj, kMan)));
EXPECT_EQ(-11, machine.finalizeAndGetBoundaryOffset());
}
@@ -385,8 +412,9 @@ TEST_F(BackwardGraphemeBoundaryStatemachineTest, Flags_singleFlag) {
EXPECT_EQ(-4, machine.finalizeAndGetBoundaryOffset());
// U+1F441 + [U] + [S]
- EXPECT_EQ("RRRRRF", processSequenceBackward(
- &machine, asCodePoints(kEye, kRisU, kRisS)));
+ EXPECT_EQ(
+ "RRRRRF",
+ processSequenceBackward(&machine, asCodePoints(kEye, kRisU, kRisS)));
EXPECT_EQ(-4, machine.finalizeAndGetBoundaryOffset());
// SOT + [U] + [S]
@@ -395,13 +423,15 @@ TEST_F(BackwardGraphemeBoundaryStatemachineTest, Flags_singleFlag) {
EXPECT_EQ(-4, machine.finalizeAndGetBoundaryOffset());
// [Lead] + [U] + [S]
- EXPECT_EQ("RRRRF", processSequenceBackward(
- &machine, asCodePoints(kLead, kRisU, kRisS)));
+ EXPECT_EQ(
+ "RRRRF",
+ processSequenceBackward(&machine, asCodePoints(kLead, kRisU, kRisS)));
EXPECT_EQ(-4, machine.finalizeAndGetBoundaryOffset());
// 'a' + [Trail] + [U] + [S]
- EXPECT_EQ("RRRRRF", processSequenceBackward(
- &machine, asCodePoints('a', kTrail, kRisU, kRisS)));
+ EXPECT_EQ("RRRRRF",
+ processSequenceBackward(&machine,
+ asCodePoints('a', kTrail, kRisU, kRisS)));
EXPECT_EQ(-4, machine.finalizeAndGetBoundaryOffset());
// [Trail] + [Trail] + [U] + [S]
@@ -411,8 +441,9 @@ TEST_F(BackwardGraphemeBoundaryStatemachineTest, Flags_singleFlag) {
EXPECT_EQ(-4, machine.finalizeAndGetBoundaryOffset());
// SOT + [Trail] + [U] + [S]
- EXPECT_EQ("RRRRRF", processSequenceBackward(
- &machine, asCodePoints(kTrail, kRisU, kRisS)));
+ EXPECT_EQ(
+ "RRRRRF",
+ processSequenceBackward(&machine, asCodePoints(kTrail, kRisU, kRisS)));
EXPECT_EQ(-4, machine.finalizeAndGetBoundaryOffset());
}
@@ -444,15 +475,17 @@ TEST_F(BackwardGraphemeBoundaryStatemachineTest, Flags_twoFlags) {
EXPECT_EQ(-4, machine.finalizeAndGetBoundaryOffset());
// 'a' + [Trail] + [U] + [S] + [U] + [S]
- EXPECT_EQ("RRRRRRRRRF", processSequenceBackward(
- &machine, asCodePoints('a', kTrail, kRisU, kRisS,
- kRisU, kRisS)));
+ EXPECT_EQ(
+ "RRRRRRRRRF",
+ processSequenceBackward(
+ &machine, asCodePoints('a', kTrail, kRisU, kRisS, kRisU, kRisS)));
EXPECT_EQ(-4, machine.finalizeAndGetBoundaryOffset());
// [Trail] + [Trail] + [U] + [S] + [U] + [S]
- EXPECT_EQ("RRRRRRRRRF", processSequenceBackward(
- &machine, asCodePoints(kTrail, kTrail, kRisU,
- kRisS, kRisU, kRisS)));
+ EXPECT_EQ(
+ "RRRRRRRRRF",
+ processSequenceBackward(
+ &machine, asCodePoints(kTrail, kTrail, kRisU, kRisS, kRisU, kRisS)));
EXPECT_EQ(-4, machine.finalizeAndGetBoundaryOffset());
// SOT + [Trail] + [U] + [S] + [U] + [S]
@@ -466,23 +499,27 @@ TEST_F(BackwardGraphemeBoundaryStatemachineTest, Flags_oddNumberedRIS) {
BackwardGraphemeBoundaryStateMachine machine;
// 'a' + [U] + [S] + [U]
- EXPECT_EQ("RRRRRRF", processSequenceBackward(
- &machine, asCodePoints('a', kRisU, kRisS, kRisU)));
+ EXPECT_EQ("RRRRRRF",
+ processSequenceBackward(&machine,
+ asCodePoints('a', kRisU, kRisS, kRisU)));
EXPECT_EQ(-2, machine.finalizeAndGetBoundaryOffset());
// U+1F441 + [U] + [S] + [U]
- EXPECT_EQ("RRRRRRRF", processSequenceBackward(
- &machine, asCodePoints(kEye, kRisU, kRisS, kRisU)));
+ EXPECT_EQ("RRRRRRRF",
+ processSequenceBackward(&machine,
+ asCodePoints(kEye, kRisU, kRisS, kRisU)));
EXPECT_EQ(-2, machine.finalizeAndGetBoundaryOffset());
// SOT + [U] + [S] + [U]
- EXPECT_EQ("RRRRRRF", processSequenceBackward(
- &machine, asCodePoints(kRisU, kRisS, kRisU)));
+ EXPECT_EQ(
+ "RRRRRRF",
+ processSequenceBackward(&machine, asCodePoints(kRisU, kRisS, kRisU)));
EXPECT_EQ(-2, machine.finalizeAndGetBoundaryOffset());
// [Lead] + [U] + [S] + [U]
- EXPECT_EQ("RRRRRRF", processSequenceBackward(
- &machine, asCodePoints(kLead, kRisU, kRisS, kRisU)));
+ EXPECT_EQ("RRRRRRF",
+ processSequenceBackward(&machine,
+ asCodePoints(kLead, kRisU, kRisS, kRisU)));
EXPECT_EQ(-2, machine.finalizeAndGetBoundaryOffset());
// 'a' + [Trail] + [U] + [S] + [U]

Powered by Google App Engine
This is Rietveld 408576698