Skip to content

Commit f3075af

Browse files
committed
endl => \n [skip ci]
1 parent 17b92e9 commit f3075af

9 files changed

Lines changed: 19 additions & 19 deletions

File tree

test/array/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ int main()
1616

1717
for (auto i=0u; i < x2.size(); i++){
1818
if (x2[i] != 2*x[i]){
19-
std::cerr << "value " << x2[i] << "!=" << x[i] << std::endl;
19+
std::cerr << "value " << x2[i] << "!=" << x[i] << "\n";
2020
return EXIT_FAILURE;
2121
}
2222
}

test/iterator/iter_vector.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ void* ptr = &(*it);
1616
auto it2 = static_cast<std::vector<int>::iterator*>(ptr);
1717

1818

19-
std::cout << *it << std::endl;
19+
std::cout << *it << "\n";
2020
incrementIterator(it);
21-
std::cout << *it << std::endl;
21+
std::cout << *it << "\n";
2222
incrementIterator(it);
23-
std::cout << *it << std::endl;
23+
std::cout << *it << "\n";
2424
incrementIterator(it);
2525

2626
return EXIT_SUCCESS;

test/malloc/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ int main()
1919

2020
for (auto i=0u; i < N; i++){
2121
if (x2[i] != 2 * x[i]){
22-
std::cerr << "value " << x2[i] << "!=" << x[i] << std::endl;
22+
std::cerr << "value " << x2[i] << "!=" << x[i] << "\n";
2323
return EXIT_FAILURE;
2424
}
2525
}

test/pointer/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ int main()
1717
point23(&a[0], &b[0], &N);
1818

1919
if (b[0] != a[1] || b[1] != a[2]){
20-
std::cerr << "value " << b[0] << "!=" << a[1] << " or " << b[1] << "!=" << a[2] << std::endl;
20+
std::cerr << "value " << b[0] << " != " << a[1] << " or " << b[1] << " != " << a[2] << "\n";
2121
return EXIT_FAILURE;
2222
}
2323

test/poly_type/main.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ int main(){
1919
std::cerr << "Error: " << A << " != 4\n";
2020
return EXIT_FAILURE;
2121
}
22-
std::cout << "C:3 = " << C << std::endl;
22+
std::cout << "C:3 = " << C << "\n";
2323
add_one_C(&xtype, &x3, &A, &C);
24-
std::cout << "C:3 = " << C << std::endl;
24+
std::cout << "C:3 = " << C << "\n";
2525
add_one_C(&xtype, &x3, &A, &C);
26-
std::cout << "C:3 = " << C << std::endl;
26+
std::cout << "C:3 = " << C << "\n";
2727

2828
xtype = 4;
2929
init_type(&xtype, &x4);
@@ -33,11 +33,11 @@ int main(){
3333
std::cerr << "Error: " << A << " != 5\n";
3434
return EXIT_FAILURE;
3535
}
36-
std::cout << "C:4 = " << C << std::endl;
36+
std::cout << "C:4 = " << C << "\n";
3737
add_one_C(&xtype, &x4, &A, &C);
38-
std::cout << "C:4 = " << C << std::endl;
38+
std::cout << "C:4 = " << C << "\n";
3939
add_one_C(&xtype, &x4, &A, &C);
40-
std::cout << "C:4 = " << C << std::endl;
40+
std::cout << "C:4 = " << C << "\n";
4141

4242
dealloc_type(&xtype, &x3);
4343
std::cout << "three deallocated\n";

test/struct/lib.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ void struct_check_cpp(struct params *s) {
99
struct params *p = s;
1010

1111
if (p->my_int != 123) {
12-
std::cerr << "Error: my_int = " << p->my_int << std::endl;
12+
std::cerr << "Error: my_int = " << p->my_int << "\n";
1313
exit(EXIT_FAILURE);
1414
}
1515

@@ -19,7 +19,7 @@ if (! p->my_bool) {
1919
}
2020

2121
if (strncmp(p->my_char, "Hello", 5) != 0) {
22-
std::cerr << "Error: my_char != Hello " << p->my_char << std::endl;
22+
std::cerr << "Error: my_char != Hello " << p->my_char << "\n";
2323
exit(EXIT_FAILURE);
2424
}
2525

test/submodule/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
int main() {
1212

1313
if (fabs(pi() - M_PI) > 1e-4) {
14-
std::cerr << "pi() unexpected value: " << pi() << std::endl;
14+
std::cerr << "pi() unexpected value: " << pi() << "\n";
1515
return EXIT_FAILURE;
1616
}
1717

18-
std::cout << "OK: pi() value: " << pi() << std::endl;
18+
std::cout << "OK: pi() value: " << pi() << "\n";
1919

2020
return EXIT_SUCCESS;
2121

test/time/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ int main(){
1111
auto cpp_tic = std::chrono::steady_clock::now();
1212
auto cpp_toc = std::chrono::steady_clock::now();
1313

14-
std::cout << "c++ toc-tic: " << (cpp_toc - cpp_tic).count() << std::endl;
14+
std::cout << "c++ toc-tic: " << (cpp_toc - cpp_tic).count() << "\n";
1515

1616
auto fortran_diff = ticker();
1717

18-
std::cout << "fortran toc-tic: " << fortran_diff << std::endl;
18+
std::cout << "fortran toc-tic: " << fortran_diff << "\n";
1919

2020
return EXIT_SUCCESS;
2121
}

test/vector/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ int main()
1717
for (auto i=0u; i < x2.size(); i++){
1818
std::cout << x2[i] << "\n";
1919
if (x2[i] != 2*x[i]){
20-
std::cerr << "value " << x2[i] << "!=" << x[i] << std::endl;
20+
std::cerr << "value " << x2[i] << "!=" << x[i] << "\n";
2121
return EXIT_FAILURE;
2222
}
2323
}

0 commit comments

Comments
 (0)