Skip to content

Commit 7892794

Browse files
authored
Merge pull request #835 from anne-glerum/fix_typos
Fix Asserts and typos
2 parents 5ecba94 + 4131dda commit 7892794

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

source/gwb-grid/main.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ int main(int argc, char **argv)
354354
if (find_command_line_option(argv, argv+argc, "-h") || find_command_line_option(argv, argv+argc, "--help"))
355355
{
356356
std::cout << "World Builder Grid Visualization tool.\n"
357-
<< "This program loads a world builder file and generates a visualization on a structured grid "
357+
<< "This program loads a World Builder file and generates a visualization on a structured grid "
358358
<< "based on information specified in a separate .grid configuration file.\n\n"
359359
<< "Usage:\n"
360360
<< argv[0] << " [-j N] [--filtered] [--by-tag] example.wb example.grid\n\n"
@@ -442,7 +442,7 @@ int main(int argc, char **argv)
442442
/**
443443
* Try to start the world builder
444444
*/
445-
std::cout << "[2/6] Starting the world builder with " << number_of_threads << " threads... \r";
445+
std::cout << "[2/6] Starting the World Builder with " << number_of_threads << " threads... \r";
446446
std::cout.flush();
447447

448448
std::unique_ptr<WorldBuilder::World> world;
@@ -452,7 +452,7 @@ int main(int argc, char **argv)
452452
}
453453
catch (std::exception &e)
454454
{
455-
std::cerr << "Could not start the World builder from file '" << wb_file << "', error: " << e.what() << "\n";
455+
std::cerr << "Could not start the World Builder from file '" << wb_file << "', error: " << e.what() << "\n";
456456

457457
#ifdef WB_WITH_MPI
458458
MPI_Finalize();
@@ -566,12 +566,12 @@ int main(int argc, char **argv)
566566
WBAssertThrow(!std::isnan(z_max), "z_max is not a number:" << z_max << ". This value has probably not been provided in the grid file.");
567567

568568

569-
WBAssertThrow(n_cell_x != 0, "n_cell_z may not be equal to zero: " << n_cell_x << '.');
569+
WBAssertThrow(n_cell_x != 0, "n_cell_x may not be equal to zero: " << n_cell_x << '.');
570570
// int's cannot generally be nan's (see https://stackoverflow.com/questions/3949457/can-an-integer-be-nan-in-c),
571571
// but visual studio is giving problems over this, so it is taken out for now.
572-
//WBAssertThrow(!std::isnan(n_cell_x), "n_cell_z is not a number:" << n_cell_x << '.');
572+
//WBAssertThrow(!std::isnan(n_cell_x), "n_cell_x is not a number:" << n_cell_x << '.');
573573

574-
WBAssertThrow(dim == 3 || n_cell_z != 0, "In 3d n_cell_z may not be equal to zero: " << n_cell_y << '.');
574+
WBAssertThrow(dim == 2 || n_cell_y != 0, "In 3d n_cell_y may not be equal to zero: " << n_cell_y << '.');
575575
// int's cannot generally be nan's (see https://stackoverflow.com/questions/3949457/can-an-integer-be-nan-in-c),
576576
// but visual studio is giving problems over this, so it is taken out for now.
577577
//WBAssertThrow(!std::isnan(n_cell_z), "n_cell_z is not a number:" << n_cell_y << '.');

source/world_builder/world.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,15 @@ namespace WorldBuilder
165165
*/
166166

167167
WBAssertThrow((prm.get<std::string>("version") == Version::MAJOR + "." + Version::MINOR),
168-
"The major and minor version combination for which is input file was written "
168+
"The major and minor version combination for which this input file was written "
169169
"is not the same as the version of the World Builder you are running. This means "
170-
"That there may have been incompatible changes made between the versions. \n\n"
170+
"that there may have been incompatible changes made between the versions. \n\n"
171171
"Verify those changes and whether they affect your model. If this is not "
172172
"the case, adjust the version number in the input file. \n\nThe provided version "
173-
"number is \"" << prm.get<std::string>("version") << "\", while the used world builder "
173+
"number is \"" << prm.get<std::string>("version") << "\", while the used World Builder "
174174
"has (major.minor) version \"" << Version::MAJOR << "." << Version::MINOR << "\". "
175175
"If you created this file from scratch, fill set the version number to \"" <<
176-
Version::MAJOR << "." << Version::MINOR << "\" to continue. If you got the world builder "
176+
Version::MAJOR << "." << Version::MINOR << "\" to continue. If you got the World Builder "
177177
"file from somewhere, make sure that the output is what you expect it to be, because "
178178
"backwards incompatible changes may have been made to the code.");
179179

tests/gwb-dat/run_gwb-dat_tests.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ String(REGEX REPLACE "[:/a-zA-Z\\/0-9_\\.-]*gwb-grid[.exe]*" "(..path..)bin/gwb-
5454
String(REGEX REPLACE " -j N Specify the number of threads the visualizer is allowed to use. Default: [0-9]*." " -j N Specify the number of threads the visualizer is allowed to use. Default: --." TEST_OUTPUT_PROCESSED "${TEST_OUTPUT_PROCESSED}")
5555
String(REGEX REPLACE "GWB Version: [0-9.a-zA-Z]*" "GWB Version: -.-.-.-" TEST_OUTPUT_PROCESSED "${TEST_OUTPUT_PROCESSED}")
5656
String(REGEX REPLACE "git hash: [0-9.a-zA-Z-]* branch: [-0-9.a-zA-Z_]*" "git hash: (..git hash..) branch: (..git branch..)" TEST_OUTPUT_PROCESSED "${TEST_OUTPUT_PROCESSED}")
57-
String(REGEX REPLACE "Starting the world builder with ([0-9]*) threads..." "Starting the world builder with -- threads..." TEST_OUTPUT_PROCESSED "${TEST_OUTPUT_PROCESSED}")
57+
String(REGEX REPLACE "Starting the World Builder with ([0-9]*) threads..." "Starting the World Builder with -- threads..." TEST_OUTPUT_PROCESSED "${TEST_OUTPUT_PROCESSED}")
5858
file(WRITE ${TEST_OUTPUT} ${TEST_OUTPUT_PROCESSED})
5959

6060
if( TEST_RESULT_VAR )

tests/gwb-grid/grid_help.log

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
World Builder Grid Visualization tool.
2-
This program loads a world builder file and generates a visualization on a structured grid based on information specified in a separate .grid configuration file.
2+
This program loads a World Builder file and generates a visualization on a structured grid based on information specified in a separate .grid configuration file.
33

44
Usage:
55
(..path..)bin/gwb-grid [-j N] [--filtered] [--by-tag] example.wb example.grid

tests/gwb-grid/grid_non_existing_wb.log

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
[1/6] Parsing file... [2/6] Starting the world builder with -- threads... Expected fail with:
1+
[1/6] Parsing file... [2/6] Starting the World Builder with -- threads... Expected fail with:
22
AssertThrow `(..error type..)` failed in (..path..)/source/world_builder/utilities.cc at line (..line..): Could not open file <..file..>.
33

0 commit comments

Comments
 (0)