Skip to content

Commit

Permalink
Remove cpp::range from slice files
Browse files Browse the repository at this point in the history
  • Loading branch information
externl committed Feb 27, 2024
1 parent 12d2e08 commit 030e990
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 467 deletions.
340 changes: 0 additions & 340 deletions cpp/test/Ice/custom/AllTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,89 +148,6 @@ allTests(Test::TestHelper* helper)
test(ret == in);
}

{
Test::BoolSeq in(5);
in[0] = false;
in[1] = true;
in[2] = true;
in[3] = false;
in[4] = true;
Test::BoolSeq out;
Test::BoolSeq ret = t->opBoolRange(in, out);
test(out == in);
test(ret == in);
}

{
Test::ByteList in;
in.push_back('1');
in.push_back('2');
in.push_back('3');
in.push_back('4');
in.push_back('5');
Test::ByteList out;
Test::ByteList ret = t->opByteRange(in, out);
test(out == in);
test(ret == in);
}

{
Test::VariableList in;
Test::Variable v;
v.s = "THESE";
in.push_back(v);
v.s = "ARE";
in.push_back(v);
v.s = "FIVE";
in.push_back(v);
v.s = "SHORT";
in.push_back(v);
v.s = "STRINGS.";
in.push_back(v);
Test::VariableList out;
Test::VariableList ret = t->opVariableRange(in, out);
test(out == in);
test(ret == in);
}

{
Test::ByteList in;
in.push_back('1');
in.push_back('2');
in.push_back('3');
in.push_back('4');
in.push_back('5');
Test::ByteList out;
Test::ByteList ret = t->opByteRangeType(in, out);
test(out == in);
test(ret == in);
}

{
Test::VariableList in;
deque<Test::Variable> inSeq;
Test::Variable v;
v.s = "THESE";
in.push_back(v);
inSeq.push_back(v);
v.s = "ARE";
in.push_back(v);
inSeq.push_back(v);
v.s = "FIVE";
in.push_back(v);
inSeq.push_back(v);
v.s = "SHORT";
in.push_back(v);
inSeq.push_back(v);
v.s = "STRINGS.";
in.push_back(v);
inSeq.push_back(v);
Test::VariableList out;
Test::VariableList ret = t->opVariableRangeType(in, out);
test(out == in);
test(ret == in);
}

{
deque<bool> in(5);
in[0] = false;
Expand Down Expand Up @@ -700,86 +617,6 @@ allTests(Test::TestHelper* helper)
test(std::get<0>(r) == in);
}

{
Test::BoolSeq in(5);
in[0] = false;
in[1] = true;
in[2] = true;
in[3] = false;
in[4] = true;
auto r = t->opBoolRangeAsync(in).get();
test(std::get<1>(r) == in);
test(std::get<0>(r) == in);
}

{
Test::ByteList in;
in.push_back('1');
in.push_back('2');
in.push_back('3');
in.push_back('4');
in.push_back('5');

auto r = t->opByteRangeAsync(in).get();
test(std::get<1>(r) == in);
test(std::get<0>(r) == in);
}

{
Test::VariableList in;
Test::Variable v;
v.s = "THESE";
in.push_back(v);
v.s = "ARE";
in.push_back(v);
v.s = "FIVE";
in.push_back(v);
v.s = "SHORT";
in.push_back(v);
v.s = "STRINGS.";
in.push_back(v);
auto r = t->opVariableRangeAsync(in).get();
test(std::get<1>(r) == in);
test(std::get<0>(r) == in);
}

{
Test::ByteList in;
in.push_back('1');
in.push_back('2');
in.push_back('3');
in.push_back('4');
in.push_back('5');
auto r = t->opByteRangeTypeAsync(in).get();
test(std::get<1>(r) == in);
test(std::get<0>(r) == in);
}

{
Test::VariableList in;
deque<Test::Variable> inSeq;
Test::Variable v;
v.s = "THESE";
in.push_back(v);
inSeq.push_back(v);
v.s = "ARE";
in.push_back(v);
inSeq.push_back(v);
v.s = "FIVE";
in.push_back(v);
inSeq.push_back(v);
v.s = "SHORT";
in.push_back(v);
inSeq.push_back(v);
v.s = "STRINGS.";
in.push_back(v);
inSeq.push_back(v);

auto r = t->opVariableRangeTypeAsync(in).get();
test(std::get<1>(r) == in);
test(std::get<0>(r) == in);
}

{
deque<bool> in(5);
in[0] = false;
Expand Down Expand Up @@ -1078,18 +915,6 @@ allTests(Test::TestHelper* helper)
test(r.size() == in.size());
test(r == in);
}

{
Test::ByteSeq in;
in.push_back('1');
in.push_back('2');
in.push_back('3');
in.push_back('4');

auto r = t->opOutRangeByteSeqAsync(in).get();
test(r.size() == in.size());
test(r == in);
}
}
cout << "ok" << endl;

Expand Down Expand Up @@ -1219,148 +1044,6 @@ allTests(Test::TestHelper* helper)
test(done.get_future().get());
}

{
Test::BoolSeq in(5);
in[0] = false;
in[1] = true;
in[2] = true;
in[3] = false;
in[4] = true;

promise<bool> done;

t->opBoolRangeAsync(in,
[&](Test::BoolSeq ret, Test::BoolSeq out)
{
test(ret == in);
test(out == in);
done.set_value(true);
},
[&](std::exception_ptr)
{
done.set_value(false);
});

test(done.get_future().get());
}

{
Test::ByteList in;
in.push_back('1');
in.push_back('2');
in.push_back('3');
in.push_back('4');
in.push_back('5');

promise<bool> done;

t->opByteRangeAsync(in,
[&](Test::ByteList ret, Test::ByteList out)
{
test(ret == in);
test(out == in);
done.set_value(true);
},
[&](std::exception_ptr)
{
done.set_value(false);
});

test(done.get_future().get());
}

{
Test::VariableList in;
Test::Variable v;
v.s = "THESE";
in.push_back(v);
v.s = "ARE";
in.push_back(v);
v.s = "FIVE";
in.push_back(v);
v.s = "SHORT";
in.push_back(v);
v.s = "STRINGS.";
in.push_back(v);

promise<bool> done;

t->opVariableRangeAsync(in,
[&](Test::VariableList ret, Test::VariableList out)
{
test(ret == in);
test(out == in);
done.set_value(true);
},
[&](std::exception_ptr)
{
done.set_value(false);
});

test(done.get_future().get());
}

{
Test::ByteList in;
in.push_back('1');
in.push_back('2');
in.push_back('3');
in.push_back('4');
in.push_back('5');

promise<bool> done;

t->opByteRangeTypeAsync(in,
[&](Test::ByteList ret, Test::ByteList out)
{
test(ret == in);
test(out == in);
done.set_value(true);
},
[&](std::exception_ptr)
{
done.set_value(false);
});

test(done.get_future().get());
}

{
Test::VariableList in;
deque<Test::Variable> inSeq;
Test::Variable v;
v.s = "THESE";
in.push_back(v);
inSeq.push_back(v);
v.s = "ARE";
in.push_back(v);
inSeq.push_back(v);
v.s = "FIVE";
in.push_back(v);
inSeq.push_back(v);
v.s = "SHORT";
in.push_back(v);
inSeq.push_back(v);
v.s = "STRINGS.";
in.push_back(v);
inSeq.push_back(v);
promise<bool> done;

t->opVariableRangeTypeAsync(in,
[&](Test::VariableList ret, Test::VariableList out)
{
test(ret == in);
test(out == in);
done.set_value(true);
},
[&](std::exception_ptr)
{
done.set_value(false);
});

test(done.get_future().get());
}

{
deque<bool> in(5);
in[0] = false;
Expand Down Expand Up @@ -1884,29 +1567,6 @@ allTests(Test::TestHelper* helper)
test(done.get_future().get());
}

{
Test::ByteSeq in;
in.push_back('1');
in.push_back('2');
in.push_back('3');
in.push_back('4');

promise<bool> done;

t->opOutRangeByteSeqAsync(in,
[&](Test::ByteSeq out)
{
test(out == in);
done.set_value(true);
},
[&](std::exception_ptr)
{
done.set_value(false);
});

test(done.get_future().get());
}

cout << "ok" << endl;

cout << "testing alternate dictionaries with new AMI... " << flush;
Expand Down
Loading

0 comments on commit 030e990

Please sign in to comment.