Skip to content

Commit 4f8ff0b

Browse files
liepieshovGoogle-ML-Automation
authored andcommitted
Use R"hlo(...)hlo" for HLO text in sample_text_test.cc.
This improves readability and allows for better syntax highlighting of the embedded HLO strings. PiperOrigin-RevId: 820710394
1 parent 56bc4f8 commit 4f8ff0b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

xla/tests/sample_text_test.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class SampleTextTest
3333
: public HloPjRtInterpreterReferenceMixin<HloPjRtTestBase> {};
3434

3535
TEST_F(SampleTextTest, Axpy) {
36-
const std::string& hlo_string = R"(
36+
const std::string& hlo_string = R"hlo(
3737
HloModule axpy_module:
3838
ENTRY %axpy.v5 (alpha: f32[], x: f32[2,4], y: f32[2,4]) -> f32[2,4] {
3939
%alpha = f32[] parameter(0)
@@ -43,20 +43,20 @@ ENTRY %axpy.v5 (alpha: f32[], x: f32[2,4], y: f32[2,4]) -> f32[2,4] {
4343
%y = f32[2,4]{1,0} parameter(2)
4444
ROOT %add = f32[2,4]{1,0} add(f32[2,4]{1,0} %multiply, f32[2,4]{1,0} %y)
4545
}
46-
)";
46+
)hlo";
4747
EXPECT_TRUE(RunAndCompareNoHloPasses(hlo_string, ErrorSpec{0.0001}));
4848
}
4949

5050
TEST_F(SampleTextTest, Tuple) {
51-
const std::string& hlo_string = R"(
51+
const std::string& hlo_string = R"hlo(
5252
HloModule TupleCreate_module:
5353
ENTRY %TupleCreate.v4 (v1: f32[], v2: f32[3], v3: f32[2,3]) -> (f32[], f32[3], f32[2,3]) {
5454
%v1 = f32[] parameter(0)
5555
%v2 = f32[3]{0} parameter(1)
5656
%v3 = f32[2,3]{1,0} parameter(2)
5757
ROOT %tuple = (f32[], f32[3]{0}, f32[2,3]{1,0}) tuple(f32[] %v1, f32[3]{0} %v2, f32[2,3]{1,0} %v3)
5858
}
59-
)";
59+
)hlo";
6060
EXPECT_TRUE(RunAndCompare(hlo_string, nullopt));
6161
}
6262

0 commit comments

Comments
 (0)