Skip to content

Commit ba04f1f

Browse files
nicoloangilerimlubin
authored andcommitted
Remove the default sense test
As requested in review, the one-line initializer doesn't need a dedicated test. Signed-off-by: Nicolò Angileri <[email protected]>
1 parent 8999869 commit ba04f1f

1 file changed

Lines changed: 0 additions & 15 deletions

File tree

‎cpp/tests/linear_programming/parser_test.cpp‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@
2121
#include <cstdint>
2222
#include <cstdio>
2323
#include <cstdlib>
24-
#include <cstring>
2524
#include <filesystem>
2625
#include <fstream>
2726
#include <limits>
28-
#include <new>
2927
#include <sstream>
3028
#include <stdexcept>
3129
#include <string>
@@ -1246,18 +1244,6 @@ void compare_data_models(const mps_data_model_t<i_t, f_t>& original,
12461244
}
12471245
}
12481246

1249-
TEST(mps_data_model, default_sense_is_minimize)
1250-
{
1251-
// Construct the model in storage filled with non-zero bytes, so that a sense flag left
1252-
// uninitialized by the default constructor would read as maximize.
1253-
using model_t = mps_data_model_t<int, double>;
1254-
alignas(model_t) unsigned char storage[sizeof(model_t)];
1255-
std::memset(storage, 1, sizeof(storage));
1256-
auto* model = new (storage) model_t;
1257-
EXPECT_FALSE(model->get_sense());
1258-
model->~model_t();
1259-
}
1260-
12611247
TEST(mps_roundtrip, empty_constraint_matrix)
12621248
{
12631249
mps_data_model_t<int, double> model;
@@ -1284,7 +1270,6 @@ TEST(mps_roundtrip, empty_constraint_matrix)
12841270
writer.write(temp_file.string());
12851271

12861272
auto reloaded = read_mps<int, double>(temp_file.string(), false);
1287-
EXPECT_FALSE(reloaded.get_sense());
12881273
EXPECT_THAT(reloaded.get_constraint_matrix_offsets(), ElementsAre(0, 0));
12891274
EXPECT_TRUE(reloaded.get_constraint_matrix_values().empty());
12901275
EXPECT_THAT(reloaded.get_constraint_bounds(), ElementsAre(1.0));

0 commit comments

Comments
 (0)