Skip to content

Commit

Permalink
Simplify pipeline strings for translate tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Jun 21, 2019
1 parent bd9c077 commit bc39b20
Showing 1 changed file with 38 additions and 42 deletions.
80 changes: 38 additions & 42 deletions test/unit/apps/TranslateTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,60 +131,56 @@ TEST(TranslateTest, t2)
output), 0);

// Check that we work with only an output.
json = " \
{ \
\\\"pipeline\\\" : [ \
{ \
\\\"type\\\":\\\"writers.las\\\", \
\\\"filename\\\":\\\"badoutput.las\\\" \
} \
] \
}";
json = R"(
[
{
\"type\": \"writers.las\",
\"filename\": \"badoutput.las\"
}
]
)";
EXPECT_EQ(runTranslate(in + " " + out + " --json=\"" + json + "\"",
output), 0);

// Check that we work with only an input.
json = " \
{ \
\\\"pipeline\\\" : [ \
{ \
\\\"type\\\":\\\"readers.las\\\", \
\\\"filename\\\":\\\"badinput.las\\\" \
} \
] \
}";
json = R"(
[
{
\"type\": \"readers.las\",
\"filename\": \"badinput.las\"
}
]
)";
EXPECT_EQ(runTranslate(in + " " + out + " --json=\"" + json + "\"",
output), 0);

// Check that we succeed with unchanined multiple writers.
json = " \
{ \
\\\"pipeline\\\" : [ \
{ \
\\\"type\\\":\\\"writers.las\\\", \
\\\"filename\\\":\\\"badoutput.las\\\" \
}, \
\\\"badoutput2.las\\\" \
] \
}";
json = R"(
[
{
\"type\": \"writers.las\",
\"filename\": \"badoutput.las\"
},
\"badoutput2.las\"
]
)";
EXPECT_EQ(runTranslate(in + " " + out + " --json=\"" + json + "\"",
output), 0);

// Check that we can handle chained writers.
json = " \
{ \
\\\"pipeline\\\" : [ \
{ \
\\\"type\\\":\\\"writers.las\\\", \
\\\"filename\\\":\\\"badoutput.las\\\", \
\\\"tag\\\":\\\"mytag\\\" \
}, \
{ \
\\\"filename\\\":\\\"badoutput2.las\\\", \
\\\"inputs\\\": \\\"mytag\\\" \
} \
] \
}";
json = R"(
[
{
\"type\": \"writers.las\",
\"filename\": \"badoutput.las\",
\"tag\": \"mytag\"
},
{
\"filename\": \"badoutput2.las\",
\"inputs\": \"mytag\"
}
]
)";
EXPECT_EQ(runTranslate(in + " " + out + " --json=\"" + json + "\"",
output), 0);
}
Expand Down

0 comments on commit bc39b20

Please sign in to comment.