[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master f5d41a0 7/8: Replace raw string literals
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master f5d41a0 7/8: Replace raw string literals |
Date: |
Mon, 8 Mar 2021 11:19:47 -0500 (EST) |
branch: master
commit f5d41a09ecf2e6df1acf4b6f59f8e44a30d1f096
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Replace raw string literals
---
rate_table_test.cpp | 49 +++++++++++++++++++++++--------------------------
1 file changed, 23 insertions(+), 26 deletions(-)
diff --git a/rate_table_test.cpp b/rate_table_test.cpp
index e131dbf..a0794d5 100644
--- a/rate_table_test.cpp
+++ b/rate_table_test.cpp
@@ -129,23 +129,20 @@ int const qx_cso_num_tables = 142;
std::string const qx_ins_path("/opt/lmi/data/qx_ins");
-// NB: "1+" is used here just to allow formatting multiline strings in a
-// natural way and strips the leading new line.
-
/// Prefix used for the test tables.
-std::string const simple_table_header(1 + R"table(
-Table number: 1
-Table type: Aggregate
-Minimum age: 0
-Maximum age: 1
-Number of decimal places: 5
-Table values:
-)table");
-
-std::string const simple_table_values(1 + R"table(
- 0 0.12345
- 1 0.23456
-)table");
+std::string const simple_table_header =
+ "Table number: 1\n"
+ "Table type: Aggregate\n"
+ "Minimum age: 0\n"
+ "Maximum age: 1\n"
+ "Number of decimal places: 5\n"
+ "Table values:\n"
+ ;
+
+std::string const simple_table_values =
+ " 0 0.12345\n"
+ " 1 0.23456\n"
+ ;
/// Minimal valid SOA table in text format.
std::string const simple_table_text(simple_table_header + simple_table_values);
@@ -154,16 +151,16 @@ std::string const simple_table_text(simple_table_header +
simple_table_values);
/// 'rate_table.cpp', both write these table values in a field of width
/// four: two spaces between columns, plus one for the data, plus one
/// for a nonexistent decimal point.
-std::string const integral_table(1 + R"table(
-Table number: 1
-Table type: Aggregate
-Minimum age: 0
-Maximum age: 1
-Number of decimal places: 0
-Table values:
- 0 0
- 1 1
-)table");
+std::string const integral_table =
+ "Table number: 1\n"
+ "Table type: Aggregate\n"
+ "Minimum age: 0\n"
+ "Maximum age: 1\n"
+ "Number of decimal places: 0\n"
+ "Table values:\n"
+ " 0 0\n"
+ " 1 1\n"
+ ;
} // Unnamed namespace.
/// Test opening database files.
- [lmi-commits] [lmi] master updated (0ec5f1b -> 9cc560d), Greg Chicares, 2021/03/08
- [lmi-commits] [lmi] master 88f799c 6/8: Avoid using gcc-specific warnings with clang, Greg Chicares, 2021/03/08
- [lmi-commits] [lmi] master d126046 5/8: Disable clang -Wbraced-scalar-init in a test, Greg Chicares, 2021/03/08
- [lmi-commits] [lmi] master 9cc560d 8/8: Fix defect introduced 20210303T1108Z: misalignment, Greg Chicares, 2021/03/08
- [lmi-commits] [lmi] master 71238a3 4/8: Disable clang tautological constant compare warning in a test, Greg Chicares, 2021/03/08
- [lmi-commits] [lmi] master 0dda3f5 2/8: Disable clang -Wself-assign-overloaded warning in date test, Greg Chicares, 2021/03/08
- [lmi-commits] [lmi] master fc767f7 3/8: Include <cmath> to get std::rint() declaration, not <math.h>, Greg Chicares, 2021/03/08
- [lmi-commits] [lmi] master 33a1270 1/8: Remove tests involving std::mem_fun, Greg Chicares, 2021/03/08
- [lmi-commits] [lmi] master f5d41a0 7/8: Replace raw string literals,
Greg Chicares <=