diff --git a/src/constrainteq.cpp b/src/constrainteq.cpp index 41c0300..f3d0a11 100644 --- a/src/constrainteq.cpp +++ b/src/constrainteq.cpp @@ -53,7 +53,7 @@ Expr *ConstraintBase::VectorsParallel(int eq, ExprVector a, ExprVector b) { } if(eq == 0) return e0; - if(eq == 1) return e1; + if(eq == 1) return e1; // BRANCH_ALWAYS_TAKEN ssassert(false, "Unexpected index of equation"); } @@ -729,7 +729,7 @@ void ConstraintBase::GenerateReal(IdList *l) const { // an endpoint; so that's normal to the tangent, not // parallel. parallel = !parallel; - } else if(e->type == Entity::Type::CUBIC) { + } else if(e->type == Entity::Type::CUBIC) { // BRANCH_ALWAYS_TAKEN if(oth) { dir[i] = e->CubicGetFinishTangentExprs(); } else { diff --git a/src/drawconstraint.cpp b/src/drawconstraint.cpp index e14ebcc..5c09a2f 100644 --- a/src/drawconstraint.cpp +++ b/src/drawconstraint.cpp @@ -227,8 +227,8 @@ void Constraint::DoLineWithArrows(Canvas *canvas, Canvas::hStroke hcs, if(!onlyOneExt) { DoLine(canvas, hcs, b, be.Plus(out.WithMagnitude(10*pixels))); } else { - Vector prj = be; - DoProjectedPoint(canvas, hcs, &prj); + // Vector prj = be; + // DoProjectedPoint(canvas, hcs, &prj); } int within = DoLineTrimmedAgainstBox(canvas, hcs, ref, ae, be); diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index e79d9bb..f4c4a0d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -65,8 +65,10 @@ add_custom_target(solvespace-test ALL # coverage reports if(ENABLE_COVERAGE) - set(LCOV_FLAGS -q --rc lcov_branch_coverage=1 --rc lcov_excl_line=ssassert) - set(LCOV_FLAGS ${LCOV_FLAGS} --gcov-tool ${GCOV}) + set(LCOV_FLAGS -q --gcov-tool ${GCOV}) + set(LCOV_FLAGS ${LCOV_FLAGS} --rc lcov_branch_coverage=1) + set(LCOV_FLAGS ${LCOV_FLAGS} --rc "lcov_excl_line=(ssassert|switch)") + set(LCOV_FLAGS ${LCOV_FLAGS} --rc "lcov_excl_br_line=BRANCH_ALWAYS_TAKEN") set(LCOV_COLLECT -c -b ${CMAKE_SOURCE_DIR}/src -d ${CMAKE_BINARY_DIR}/src --no-external) add_custom_command( diff --git a/test/constraint/angle/free_in_3d.png b/test/constraint/angle/free_in_3d.png new file mode 100644 index 0000000..4fb2e9f Binary files /dev/null and b/test/constraint/angle/free_in_3d.png differ diff --git a/test/constraint/angle/free_in_3d.slvs b/test/constraint/angle/free_in_3d.slvs new file mode 100644 index 0000000..488f552 Binary files /dev/null and b/test/constraint/angle/free_in_3d.slvs differ diff --git a/test/constraint/angle/free_in_3d_v20.slvs b/test/constraint/angle/free_in_3d_v20.slvs new file mode 100644 index 0000000..7f118f9 Binary files /dev/null and b/test/constraint/angle/free_in_3d_v20.slvs differ diff --git a/test/constraint/angle/reference.png b/test/constraint/angle/reference.png new file mode 100644 index 0000000..59376ff Binary files /dev/null and b/test/constraint/angle/reference.png differ diff --git a/test/constraint/angle/reference.slvs b/test/constraint/angle/reference.slvs new file mode 100644 index 0000000..0408a83 Binary files /dev/null and b/test/constraint/angle/reference.slvs differ diff --git a/test/constraint/angle/reference_free_in_3d.png b/test/constraint/angle/reference_free_in_3d.png new file mode 100644 index 0000000..9e8a2ab Binary files /dev/null and b/test/constraint/angle/reference_free_in_3d.png differ diff --git a/test/constraint/angle/reference_free_in_3d.slvs b/test/constraint/angle/reference_free_in_3d.slvs new file mode 100644 index 0000000..dd91a68 Binary files /dev/null and b/test/constraint/angle/reference_free_in_3d.slvs differ diff --git a/test/constraint/angle/reference_free_in_3d_v20.slvs b/test/constraint/angle/reference_free_in_3d_v20.slvs new file mode 100644 index 0000000..8a6aef6 Binary files /dev/null and b/test/constraint/angle/reference_free_in_3d_v20.slvs differ diff --git a/test/constraint/angle/reference_v20.slvs b/test/constraint/angle/reference_v20.slvs new file mode 100644 index 0000000..1ba8cb6 Binary files /dev/null and b/test/constraint/angle/reference_v20.slvs differ diff --git a/test/constraint/angle/test.cpp b/test/constraint/angle/test.cpp index c83a901..57d7820 100644 --- a/test/constraint/angle/test.cpp +++ b/test/constraint/angle/test.cpp @@ -1,13 +1,49 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } + +TEST_CASE(free_in_3d_roundtrip) { + CHECK_LOAD("free_in_3d.slvs"); + CHECK_RENDER("free_in_3d.png"); + CHECK_SAVE("free_in_3d.slvs"); +} + +TEST_CASE(free_in_3d_migrate_from_v20) { + CHECK_LOAD("free_in_3d_v20.slvs"); + CHECK_RENDER("free_in_3d.png"); + CHECK_SAVE("free_in_3d.slvs"); +} + +TEST_CASE(reference_roundtrip) { + CHECK_LOAD("reference.slvs"); + CHECK_RENDER("reference.png"); + CHECK_SAVE("reference.slvs"); +} + +TEST_CASE(reference_migrate_from_v20) { + CHECK_LOAD("reference_v20.slvs"); + CHECK_RENDER("reference.png"); + CHECK_SAVE("reference.slvs"); +} + +TEST_CASE(reference_free_in_3d_roundtrip) { + CHECK_LOAD("reference_free_in_3d.slvs"); + CHECK_RENDER("reference_free_in_3d.png"); + CHECK_SAVE("reference_free_in_3d.slvs"); +} + +TEST_CASE(reference_free_in_3d_migrate_from_v20) { + CHECK_LOAD("reference_free_in_3d_v20.slvs"); + CHECK_RENDER("reference_free_in_3d.png"); + CHECK_SAVE("reference_free_in_3d.slvs"); +} diff --git a/test/constraint/arc_line_tangent/normal.png b/test/constraint/arc_line_tangent/normal.png index 0d97326..c2c6502 100644 Binary files a/test/constraint/arc_line_tangent/normal.png and b/test/constraint/arc_line_tangent/normal.png differ diff --git a/test/constraint/arc_line_tangent/normal.slvs b/test/constraint/arc_line_tangent/normal.slvs index f30e98d..86a7d82 100644 Binary files a/test/constraint/arc_line_tangent/normal.slvs and b/test/constraint/arc_line_tangent/normal.slvs differ diff --git a/test/constraint/arc_line_tangent/normal_v20.slvs b/test/constraint/arc_line_tangent/normal_v20.slvs index 88019e2..402d9de 100644 Binary files a/test/constraint/arc_line_tangent/normal_v20.slvs and b/test/constraint/arc_line_tangent/normal_v20.slvs differ diff --git a/test/constraint/arc_line_tangent/test.cpp b/test/constraint/arc_line_tangent/test.cpp index c83a901..e54f651 100644 --- a/test/constraint/arc_line_tangent/test.cpp +++ b/test/constraint/arc_line_tangent/test.cpp @@ -1,12 +1,12 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); diff --git a/test/constraint/at_midpoint/line_plane_free_in_3d.png b/test/constraint/at_midpoint/line_plane_free_in_3d.png new file mode 100644 index 0000000..81d1acb Binary files /dev/null and b/test/constraint/at_midpoint/line_plane_free_in_3d.png differ diff --git a/test/constraint/at_midpoint/line_plane_free_in_3d.slvs b/test/constraint/at_midpoint/line_plane_free_in_3d.slvs new file mode 100644 index 0000000..be8a12c Binary files /dev/null and b/test/constraint/at_midpoint/line_plane_free_in_3d.slvs differ diff --git a/test/constraint/at_midpoint/line_plane_free_in_3d_v20.slvs b/test/constraint/at_midpoint/line_plane_free_in_3d_v20.slvs new file mode 100644 index 0000000..fa47c43 Binary files /dev/null and b/test/constraint/at_midpoint/line_plane_free_in_3d_v20.slvs differ diff --git a/test/constraint/at_midpoint/line_plane_normal.png b/test/constraint/at_midpoint/line_plane_normal.png new file mode 100644 index 0000000..510aa89 Binary files /dev/null and b/test/constraint/at_midpoint/line_plane_normal.png differ diff --git a/test/constraint/at_midpoint/line_plane_normal.slvs b/test/constraint/at_midpoint/line_plane_normal.slvs new file mode 100644 index 0000000..1c40c4c Binary files /dev/null and b/test/constraint/at_midpoint/line_plane_normal.slvs differ diff --git a/test/constraint/at_midpoint/line_plane_normal_v20.slvs b/test/constraint/at_midpoint/line_plane_normal_v20.slvs new file mode 100644 index 0000000..fa644cf Binary files /dev/null and b/test/constraint/at_midpoint/line_plane_normal_v20.slvs differ diff --git a/test/constraint/at_midpoint/line_pt_free_in_3d.png b/test/constraint/at_midpoint/line_pt_free_in_3d.png new file mode 100644 index 0000000..314734e Binary files /dev/null and b/test/constraint/at_midpoint/line_pt_free_in_3d.png differ diff --git a/test/constraint/at_midpoint/line_pt_free_in_3d.slvs b/test/constraint/at_midpoint/line_pt_free_in_3d.slvs new file mode 100644 index 0000000..2933389 Binary files /dev/null and b/test/constraint/at_midpoint/line_pt_free_in_3d.slvs differ diff --git a/test/constraint/at_midpoint/line_pt_free_in_3d_v20.slvs b/test/constraint/at_midpoint/line_pt_free_in_3d_v20.slvs new file mode 100644 index 0000000..63806c5 Binary files /dev/null and b/test/constraint/at_midpoint/line_pt_free_in_3d_v20.slvs differ diff --git a/test/constraint/at_midpoint/normal.png b/test/constraint/at_midpoint/line_pt_normal.png similarity index 100% rename from test/constraint/at_midpoint/normal.png rename to test/constraint/at_midpoint/line_pt_normal.png diff --git a/test/constraint/at_midpoint/normal.slvs b/test/constraint/at_midpoint/line_pt_normal.slvs similarity index 100% rename from test/constraint/at_midpoint/normal.slvs rename to test/constraint/at_midpoint/line_pt_normal.slvs diff --git a/test/constraint/at_midpoint/normal_v20.slvs b/test/constraint/at_midpoint/line_pt_normal_v20.slvs similarity index 100% rename from test/constraint/at_midpoint/normal_v20.slvs rename to test/constraint/at_midpoint/line_pt_normal_v20.slvs diff --git a/test/constraint/at_midpoint/test.cpp b/test/constraint/at_midpoint/test.cpp index c83a901..e61529f 100644 --- a/test/constraint/at_midpoint/test.cpp +++ b/test/constraint/at_midpoint/test.cpp @@ -1,13 +1,49 @@ #include "harness.h" -TEST_CASE(roundtrip) { - CHECK_LOAD("normal.slvs"); - CHECK_RENDER("normal.png"); - CHECK_SAVE("normal.slvs"); +TEST_CASE(line_pt_normal_roundtrip) { + CHECK_LOAD("line_pt_normal.slvs"); + CHECK_RENDER("line_pt_normal.png"); + CHECK_SAVE("line_pt_normal.slvs"); } -TEST_CASE(migrate_from_v20) { - CHECK_LOAD("normal_v20.slvs"); - CHECK_RENDER("normal.png"); - CHECK_SAVE("normal.slvs"); +TEST_CASE(line_pt_normal_migrate_from_v20) { + CHECK_LOAD("line_pt_normal_v20.slvs"); + CHECK_RENDER("line_pt_normal.png"); + CHECK_SAVE("line_pt_normal.slvs"); +} + +TEST_CASE(line_pt_free_in_3d_roundtrip) { + CHECK_LOAD("line_pt_free_in_3d.slvs"); + CHECK_RENDER("line_pt_free_in_3d.png"); + CHECK_SAVE("line_pt_free_in_3d.slvs"); +} + +TEST_CASE(line_pt_free_in_3d_migrate_from_v20) { + CHECK_LOAD("line_pt_free_in_3d_v20.slvs"); + CHECK_RENDER("line_pt_free_in_3d.png"); + CHECK_SAVE("line_pt_free_in_3d.slvs"); +} + +TEST_CASE(line_plane_normal_roundtrip) { + CHECK_LOAD("line_plane_normal.slvs"); + CHECK_RENDER("line_plane_normal.png"); + CHECK_SAVE("line_plane_normal.slvs"); +} + +TEST_CASE(line_plane_normal_migrate_from_v20) { + CHECK_LOAD("line_plane_normal_v20.slvs"); + CHECK_RENDER("line_plane_normal.png"); + CHECK_SAVE("line_plane_normal.slvs"); +} + +TEST_CASE(line_plane_free_in_3d_roundtrip) { + CHECK_LOAD("line_plane_free_in_3d.slvs"); + CHECK_RENDER("line_plane_free_in_3d.png"); + CHECK_SAVE("line_plane_free_in_3d.slvs"); +} + +TEST_CASE(line_plane_free_in_3d_migrate_from_v20) { + CHECK_LOAD("line_plane_free_in_3d_v20.slvs"); + CHECK_RENDER("line_plane_free_in_3d.png"); + CHECK_SAVE("line_plane_free_in_3d.slvs"); } diff --git a/test/constraint/comment/test.cpp b/test/constraint/comment/test.cpp index c83a901..e54f651 100644 --- a/test/constraint/comment/test.cpp +++ b/test/constraint/comment/test.cpp @@ -1,12 +1,12 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); diff --git a/test/constraint/cubic_line_tangent/free_in_3d.png b/test/constraint/cubic_line_tangent/free_in_3d.png new file mode 100644 index 0000000..1583d93 Binary files /dev/null and b/test/constraint/cubic_line_tangent/free_in_3d.png differ diff --git a/test/constraint/cubic_line_tangent/free_in_3d.slvs b/test/constraint/cubic_line_tangent/free_in_3d.slvs new file mode 100644 index 0000000..d5ca7c6 Binary files /dev/null and b/test/constraint/cubic_line_tangent/free_in_3d.slvs differ diff --git a/test/constraint/cubic_line_tangent/free_in_3d_v20.slvs b/test/constraint/cubic_line_tangent/free_in_3d_v20.slvs new file mode 100644 index 0000000..2717b89 Binary files /dev/null and b/test/constraint/cubic_line_tangent/free_in_3d_v20.slvs differ diff --git a/test/constraint/cubic_line_tangent/normal.png b/test/constraint/cubic_line_tangent/normal.png index df0d134..179db36 100644 Binary files a/test/constraint/cubic_line_tangent/normal.png and b/test/constraint/cubic_line_tangent/normal.png differ diff --git a/test/constraint/cubic_line_tangent/normal.slvs b/test/constraint/cubic_line_tangent/normal.slvs index 6487407..049bd73 100644 Binary files a/test/constraint/cubic_line_tangent/normal.slvs and b/test/constraint/cubic_line_tangent/normal.slvs differ diff --git a/test/constraint/cubic_line_tangent/normal_v20.slvs b/test/constraint/cubic_line_tangent/normal_v20.slvs index 1aa1458..c141192 100644 Binary files a/test/constraint/cubic_line_tangent/normal_v20.slvs and b/test/constraint/cubic_line_tangent/normal_v20.slvs differ diff --git a/test/constraint/cubic_line_tangent/test.cpp b/test/constraint/cubic_line_tangent/test.cpp index c83a901..c0e3caf 100644 --- a/test/constraint/cubic_line_tangent/test.cpp +++ b/test/constraint/cubic_line_tangent/test.cpp @@ -1,13 +1,25 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } + +TEST_CASE(free_in_3d_roundtrip) { + CHECK_LOAD("free_in_3d.slvs"); + CHECK_RENDER("free_in_3d.png"); + CHECK_SAVE("free_in_3d.slvs"); +} + +TEST_CASE(free_in_3d_migrate_from_v20) { + CHECK_LOAD("free_in_3d_v20.slvs"); + CHECK_RENDER("free_in_3d.png"); + CHECK_SAVE("free_in_3d.slvs"); +} diff --git a/test/constraint/curve_curve_tangent/normal.png b/test/constraint/curve_curve_tangent/arc_arc.png similarity index 100% rename from test/constraint/curve_curve_tangent/normal.png rename to test/constraint/curve_curve_tangent/arc_arc.png diff --git a/test/constraint/curve_curve_tangent/normal.slvs b/test/constraint/curve_curve_tangent/arc_arc.slvs similarity index 100% rename from test/constraint/curve_curve_tangent/normal.slvs rename to test/constraint/curve_curve_tangent/arc_arc.slvs diff --git a/test/constraint/curve_curve_tangent/normal_v20.slvs b/test/constraint/curve_curve_tangent/arc_arc_v20.slvs similarity index 100% rename from test/constraint/curve_curve_tangent/normal_v20.slvs rename to test/constraint/curve_curve_tangent/arc_arc_v20.slvs diff --git a/test/constraint/curve_curve_tangent/arc_cubic.png b/test/constraint/curve_curve_tangent/arc_cubic.png new file mode 100644 index 0000000..5b47f70 Binary files /dev/null and b/test/constraint/curve_curve_tangent/arc_cubic.png differ diff --git a/test/constraint/curve_curve_tangent/arc_cubic.slvs b/test/constraint/curve_curve_tangent/arc_cubic.slvs new file mode 100644 index 0000000..554b38a Binary files /dev/null and b/test/constraint/curve_curve_tangent/arc_cubic.slvs differ diff --git a/test/constraint/curve_curve_tangent/arc_cubic_v20.slvs b/test/constraint/curve_curve_tangent/arc_cubic_v20.slvs new file mode 100644 index 0000000..975b487 Binary files /dev/null and b/test/constraint/curve_curve_tangent/arc_cubic_v20.slvs differ diff --git a/test/constraint/curve_curve_tangent/test.cpp b/test/constraint/curve_curve_tangent/test.cpp index c83a901..c8eff43 100644 --- a/test/constraint/curve_curve_tangent/test.cpp +++ b/test/constraint/curve_curve_tangent/test.cpp @@ -1,13 +1,25 @@ #include "harness.h" -TEST_CASE(roundtrip) { - CHECK_LOAD("normal.slvs"); - CHECK_RENDER("normal.png"); - CHECK_SAVE("normal.slvs"); +TEST_CASE(arc_arc_roundtrip) { + CHECK_LOAD("arc_arc.slvs"); + CHECK_RENDER("arc_arc.png"); + CHECK_SAVE("arc_arc.slvs"); } -TEST_CASE(migrate_from_v20) { - CHECK_LOAD("normal_v20.slvs"); - CHECK_RENDER("normal.png"); - CHECK_SAVE("normal.slvs"); +TEST_CASE(arc_arc_migrate_from_v20) { + CHECK_LOAD("arc_arc_v20.slvs"); + CHECK_RENDER("arc_arc.png"); + CHECK_SAVE("arc_arc.slvs"); +} + +TEST_CASE(arc_cubic_roundtrip) { + CHECK_LOAD("arc_cubic.slvs"); + CHECK_RENDER("arc_cubic.png"); + CHECK_SAVE("arc_cubic.slvs"); +} + +TEST_CASE(arc_cubic_migrate_from_v20) { + CHECK_LOAD("arc_cubic_v20.slvs"); + CHECK_RENDER("arc_cubic.png"); + CHECK_SAVE("arc_cubic.slvs"); } diff --git a/test/constraint/diameter/reference.png b/test/constraint/diameter/reference.png new file mode 100644 index 0000000..6aad49d Binary files /dev/null and b/test/constraint/diameter/reference.png differ diff --git a/test/constraint/diameter/reference.slvs b/test/constraint/diameter/reference.slvs new file mode 100644 index 0000000..4f8455b Binary files /dev/null and b/test/constraint/diameter/reference.slvs differ diff --git a/test/constraint/diameter/reference_v20.slvs b/test/constraint/diameter/reference_v20.slvs new file mode 100644 index 0000000..eb80eb9 Binary files /dev/null and b/test/constraint/diameter/reference_v20.slvs differ diff --git a/test/constraint/diameter/test.cpp b/test/constraint/diameter/test.cpp index c83a901..ace5d36 100644 --- a/test/constraint/diameter/test.cpp +++ b/test/constraint/diameter/test.cpp @@ -1,13 +1,25 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } + +TEST_CASE(reference_roundtrip) { + CHECK_LOAD("reference.slvs"); + CHECK_RENDER("reference.png"); + CHECK_SAVE("reference.slvs"); +} + +TEST_CASE(reference_migrate_from_v20) { + CHECK_LOAD("reference_v20.slvs"); + CHECK_RENDER("reference.png"); + CHECK_SAVE("reference.slvs"); +} diff --git a/test/constraint/eq_len_pt_line_d/test.cpp b/test/constraint/eq_len_pt_line_d/test.cpp index c83a901..e54f651 100644 --- a/test/constraint/eq_len_pt_line_d/test.cpp +++ b/test/constraint/eq_len_pt_line_d/test.cpp @@ -1,12 +1,12 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); diff --git a/test/constraint/eq_pt_ln_distances/test.cpp b/test/constraint/eq_pt_ln_distances/test.cpp index c83a901..e54f651 100644 --- a/test/constraint/eq_pt_ln_distances/test.cpp +++ b/test/constraint/eq_pt_ln_distances/test.cpp @@ -1,12 +1,12 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); diff --git a/test/constraint/equal_angle/other.png b/test/constraint/equal_angle/other.png new file mode 100644 index 0000000..21cdcc4 Binary files /dev/null and b/test/constraint/equal_angle/other.png differ diff --git a/test/constraint/equal_angle/other.slvs b/test/constraint/equal_angle/other.slvs new file mode 100644 index 0000000..94cfdf2 Binary files /dev/null and b/test/constraint/equal_angle/other.slvs differ diff --git a/test/constraint/equal_angle/other_v20.slvs b/test/constraint/equal_angle/other_v20.slvs new file mode 100644 index 0000000..5e976dd Binary files /dev/null and b/test/constraint/equal_angle/other_v20.slvs differ diff --git a/test/constraint/equal_angle/test.cpp b/test/constraint/equal_angle/test.cpp index c83a901..e5afeef 100644 --- a/test/constraint/equal_angle/test.cpp +++ b/test/constraint/equal_angle/test.cpp @@ -1,13 +1,25 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } + +TEST_CASE(other_roundtrip) { + CHECK_LOAD("other.slvs"); + CHECK_RENDER("other.png"); + CHECK_SAVE("other.slvs"); +} + +TEST_CASE(other_migrate_from_v20) { + CHECK_LOAD("other_v20.slvs"); + CHECK_RENDER("other.png"); + CHECK_SAVE("other.slvs"); +} diff --git a/test/constraint/equal_length_lines/test.cpp b/test/constraint/equal_length_lines/test.cpp index c83a901..e54f651 100644 --- a/test/constraint/equal_length_lines/test.cpp +++ b/test/constraint/equal_length_lines/test.cpp @@ -1,12 +1,12 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); diff --git a/test/constraint/equal_line_arc_len/pi.png b/test/constraint/equal_line_arc_len/pi.png new file mode 100644 index 0000000..9a5ab15 Binary files /dev/null and b/test/constraint/equal_line_arc_len/pi.png differ diff --git a/test/constraint/equal_line_arc_len/pi.slvs b/test/constraint/equal_line_arc_len/pi.slvs new file mode 100644 index 0000000..009148c Binary files /dev/null and b/test/constraint/equal_line_arc_len/pi.slvs differ diff --git a/test/constraint/equal_line_arc_len/tau.png b/test/constraint/equal_line_arc_len/tau.png new file mode 100644 index 0000000..7b4a312 Binary files /dev/null and b/test/constraint/equal_line_arc_len/tau.png differ diff --git a/test/constraint/equal_line_arc_len/tau.slvs b/test/constraint/equal_line_arc_len/tau.slvs new file mode 100644 index 0000000..252f0db Binary files /dev/null and b/test/constraint/equal_line_arc_len/tau.slvs differ diff --git a/test/constraint/equal_line_arc_len/test.cpp b/test/constraint/equal_line_arc_len/test.cpp index c83a901..56916a4 100644 --- a/test/constraint/equal_line_arc_len/test.cpp +++ b/test/constraint/equal_line_arc_len/test.cpp @@ -1,13 +1,23 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } + +TEST_CASE(pi) { + CHECK_LOAD("pi.slvs"); + CHECK_RENDER("pi.png"); +} + +TEST_CASE(tau) { + CHECK_LOAD("tau.slvs"); + CHECK_RENDER("tau.png"); +} diff --git a/test/constraint/equal_radius/test.cpp b/test/constraint/equal_radius/test.cpp index c83a901..e54f651 100644 --- a/test/constraint/equal_radius/test.cpp +++ b/test/constraint/equal_radius/test.cpp @@ -1,12 +1,12 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); diff --git a/test/constraint/length_difference/reference.png b/test/constraint/length_difference/reference.png new file mode 100644 index 0000000..d2ece4c Binary files /dev/null and b/test/constraint/length_difference/reference.png differ diff --git a/test/constraint/length_difference/reference.slvs b/test/constraint/length_difference/reference.slvs new file mode 100644 index 0000000..08c5db8 Binary files /dev/null and b/test/constraint/length_difference/reference.slvs differ diff --git a/test/constraint/length_difference/test.cpp b/test/constraint/length_difference/test.cpp index 7f8723c..a739db1 100644 --- a/test/constraint/length_difference/test.cpp +++ b/test/constraint/length_difference/test.cpp @@ -1,7 +1,13 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } + +TEST_CASE(reference_roundtrip) { + CHECK_LOAD("reference.slvs"); + CHECK_RENDER("reference.png"); + CHECK_SAVE("reference.slvs"); +} diff --git a/test/constraint/length_ratio/reference.png b/test/constraint/length_ratio/reference.png new file mode 100644 index 0000000..7d3b871 Binary files /dev/null and b/test/constraint/length_ratio/reference.png differ diff --git a/test/constraint/length_ratio/reference.slvs b/test/constraint/length_ratio/reference.slvs new file mode 100644 index 0000000..c0ca95c Binary files /dev/null and b/test/constraint/length_ratio/reference.slvs differ diff --git a/test/constraint/length_ratio/reference_v20.slvs b/test/constraint/length_ratio/reference_v20.slvs new file mode 100644 index 0000000..2645f7b Binary files /dev/null and b/test/constraint/length_ratio/reference_v20.slvs differ diff --git a/test/constraint/length_ratio/test.cpp b/test/constraint/length_ratio/test.cpp index c83a901..ace5d36 100644 --- a/test/constraint/length_ratio/test.cpp +++ b/test/constraint/length_ratio/test.cpp @@ -1,13 +1,25 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } + +TEST_CASE(reference_roundtrip) { + CHECK_LOAD("reference.slvs"); + CHECK_RENDER("reference.png"); + CHECK_SAVE("reference.slvs"); +} + +TEST_CASE(reference_migrate_from_v20) { + CHECK_LOAD("reference_v20.slvs"); + CHECK_RENDER("reference.png"); + CHECK_SAVE("reference.slvs"); +} diff --git a/test/constraint/parallel/free_in_3d.png b/test/constraint/parallel/free_in_3d.png new file mode 100644 index 0000000..3ce8c89 Binary files /dev/null and b/test/constraint/parallel/free_in_3d.png differ diff --git a/test/constraint/parallel/free_in_3d.slvs b/test/constraint/parallel/free_in_3d.slvs new file mode 100644 index 0000000..1628203 Binary files /dev/null and b/test/constraint/parallel/free_in_3d.slvs differ diff --git a/test/constraint/parallel/free_in_3d_v20.slvs b/test/constraint/parallel/free_in_3d_v20.slvs new file mode 100644 index 0000000..421eb11 Binary files /dev/null and b/test/constraint/parallel/free_in_3d_v20.slvs differ diff --git a/test/constraint/parallel/test.cpp b/test/constraint/parallel/test.cpp index c83a901..c0e3caf 100644 --- a/test/constraint/parallel/test.cpp +++ b/test/constraint/parallel/test.cpp @@ -1,13 +1,25 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } + +TEST_CASE(free_in_3d_roundtrip) { + CHECK_LOAD("free_in_3d.slvs"); + CHECK_RENDER("free_in_3d.png"); + CHECK_SAVE("free_in_3d.slvs"); +} + +TEST_CASE(free_in_3d_migrate_from_v20) { + CHECK_LOAD("free_in_3d_v20.slvs"); + CHECK_RENDER("free_in_3d.png"); + CHECK_SAVE("free_in_3d.slvs"); +} diff --git a/test/constraint/perpendicular/test.cpp b/test/constraint/perpendicular/test.cpp index c83a901..e54f651 100644 --- a/test/constraint/perpendicular/test.cpp +++ b/test/constraint/perpendicular/test.cpp @@ -1,12 +1,12 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); diff --git a/test/constraint/points_coincident/free_in_3d.png b/test/constraint/points_coincident/free_in_3d.png new file mode 100644 index 0000000..cc9d7e9 Binary files /dev/null and b/test/constraint/points_coincident/free_in_3d.png differ diff --git a/test/constraint/points_coincident/free_in_3d.slvs b/test/constraint/points_coincident/free_in_3d.slvs new file mode 100644 index 0000000..81f0989 Binary files /dev/null and b/test/constraint/points_coincident/free_in_3d.slvs differ diff --git a/test/constraint/points_coincident/free_in_3d_v20.slvs b/test/constraint/points_coincident/free_in_3d_v20.slvs new file mode 100644 index 0000000..af7bd14 Binary files /dev/null and b/test/constraint/points_coincident/free_in_3d_v20.slvs differ diff --git a/test/constraint/points_coincident/test.cpp b/test/constraint/points_coincident/test.cpp index c83a901..c0e3caf 100644 --- a/test/constraint/points_coincident/test.cpp +++ b/test/constraint/points_coincident/test.cpp @@ -1,13 +1,25 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } + +TEST_CASE(free_in_3d_roundtrip) { + CHECK_LOAD("free_in_3d.slvs"); + CHECK_RENDER("free_in_3d.png"); + CHECK_SAVE("free_in_3d.slvs"); +} + +TEST_CASE(free_in_3d_migrate_from_v20) { + CHECK_LOAD("free_in_3d_v20.slvs"); + CHECK_RENDER("free_in_3d.png"); + CHECK_SAVE("free_in_3d.slvs"); +} diff --git a/test/constraint/proj_pt_distance/reference.png b/test/constraint/proj_pt_distance/reference.png new file mode 100644 index 0000000..c61e045 Binary files /dev/null and b/test/constraint/proj_pt_distance/reference.png differ diff --git a/test/constraint/proj_pt_distance/reference.slvs b/test/constraint/proj_pt_distance/reference.slvs new file mode 100644 index 0000000..6461182 Binary files /dev/null and b/test/constraint/proj_pt_distance/reference.slvs differ diff --git a/test/constraint/proj_pt_distance/reference_v20.slvs b/test/constraint/proj_pt_distance/reference_v20.slvs new file mode 100644 index 0000000..d5f3860 Binary files /dev/null and b/test/constraint/proj_pt_distance/reference_v20.slvs differ diff --git a/test/constraint/proj_pt_distance/test.cpp b/test/constraint/proj_pt_distance/test.cpp index c83a901..ace5d36 100644 --- a/test/constraint/proj_pt_distance/test.cpp +++ b/test/constraint/proj_pt_distance/test.cpp @@ -1,13 +1,25 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } + +TEST_CASE(reference_roundtrip) { + CHECK_LOAD("reference.slvs"); + CHECK_RENDER("reference.png"); + CHECK_SAVE("reference.slvs"); +} + +TEST_CASE(reference_migrate_from_v20) { + CHECK_LOAD("reference_v20.slvs"); + CHECK_RENDER("reference.png"); + CHECK_SAVE("reference.slvs"); +} diff --git a/test/constraint/pt_face_distance/normal.png b/test/constraint/pt_face_distance/normal.png new file mode 100644 index 0000000..bc1ecaf Binary files /dev/null and b/test/constraint/pt_face_distance/normal.png differ diff --git a/test/constraint/pt_face_distance/normal.slvs b/test/constraint/pt_face_distance/normal.slvs new file mode 100644 index 0000000..2e4195e Binary files /dev/null and b/test/constraint/pt_face_distance/normal.slvs differ diff --git a/test/constraint/pt_face_distance/normal_v20.slvs b/test/constraint/pt_face_distance/normal_v20.slvs new file mode 100644 index 0000000..c8a4c23 Binary files /dev/null and b/test/constraint/pt_face_distance/normal_v20.slvs differ diff --git a/test/constraint/pt_face_distance/reference.png b/test/constraint/pt_face_distance/reference.png new file mode 100644 index 0000000..cfd6842 Binary files /dev/null and b/test/constraint/pt_face_distance/reference.png differ diff --git a/test/constraint/pt_face_distance/reference.slvs b/test/constraint/pt_face_distance/reference.slvs new file mode 100644 index 0000000..a57b808 Binary files /dev/null and b/test/constraint/pt_face_distance/reference.slvs differ diff --git a/test/constraint/pt_face_distance/reference_v20.slvs b/test/constraint/pt_face_distance/reference_v20.slvs new file mode 100644 index 0000000..c506e9b Binary files /dev/null and b/test/constraint/pt_face_distance/reference_v20.slvs differ diff --git a/test/constraint/pt_face_distance/test.cpp b/test/constraint/pt_face_distance/test.cpp index 298ad90..ca633b2 100644 --- a/test/constraint/pt_face_distance/test.cpp +++ b/test/constraint/pt_face_distance/test.cpp @@ -1,12 +1,24 @@ #include "harness.h" -// TEST_CASE(roundtrip) { -// CHECK_LOAD("normal.slvs"); -// CHECK_RENDER("normal.png"); -// CHECK_SAVE("normal.slvs"); -// } +TEST_CASE(normal_roundtrip) { + CHECK_LOAD("normal.slvs"); + CHECK_RENDER("normal.png"); + CHECK_SAVE("normal.slvs"); +} -// TEST_CASE(migrate_from_v20) { -// CHECK_LOAD("normal_v20.slvs"); -// CHECK_SAVE("normal.slvs"); -// } +TEST_CASE(normal_migrate_from_v20) { + CHECK_LOAD("normal_v20.slvs"); + CHECK_SAVE("normal.slvs"); +} + +TEST_CASE(reference_roundtrip) { + CHECK_LOAD("reference.slvs"); + CHECK_RENDER("reference.png"); + CHECK_SAVE("reference.slvs"); +} + +TEST_CASE(reference_migrate_from_v20) { + CHECK_LOAD("reference_v20.slvs"); + CHECK_RENDER("reference.png"); + CHECK_SAVE("reference.slvs"); +} diff --git a/test/constraint/pt_in_plane/test.cpp b/test/constraint/pt_in_plane/test.cpp index c83a901..e54f651 100644 --- a/test/constraint/pt_in_plane/test.cpp +++ b/test/constraint/pt_in_plane/test.cpp @@ -1,12 +1,12 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); diff --git a/test/constraint/pt_line_distance/free_in_3d.png b/test/constraint/pt_line_distance/free_in_3d.png new file mode 100644 index 0000000..8b76530 Binary files /dev/null and b/test/constraint/pt_line_distance/free_in_3d.png differ diff --git a/test/constraint/pt_line_distance/free_in_3d.slvs b/test/constraint/pt_line_distance/free_in_3d.slvs new file mode 100644 index 0000000..896cfa9 Binary files /dev/null and b/test/constraint/pt_line_distance/free_in_3d.slvs differ diff --git a/test/constraint/pt_line_distance/free_in_3d_v20.slvs b/test/constraint/pt_line_distance/free_in_3d_v20.slvs new file mode 100644 index 0000000..b4c4c2a Binary files /dev/null and b/test/constraint/pt_line_distance/free_in_3d_v20.slvs differ diff --git a/test/constraint/pt_line_distance/reference.png b/test/constraint/pt_line_distance/reference.png new file mode 100644 index 0000000..8f28f96 Binary files /dev/null and b/test/constraint/pt_line_distance/reference.png differ diff --git a/test/constraint/pt_line_distance/reference.slvs b/test/constraint/pt_line_distance/reference.slvs new file mode 100644 index 0000000..7c54d8a Binary files /dev/null and b/test/constraint/pt_line_distance/reference.slvs differ diff --git a/test/constraint/pt_line_distance/reference_v20.slvs b/test/constraint/pt_line_distance/reference_v20.slvs new file mode 100644 index 0000000..8481ec4 Binary files /dev/null and b/test/constraint/pt_line_distance/reference_v20.slvs differ diff --git a/test/constraint/pt_line_distance/test.cpp b/test/constraint/pt_line_distance/test.cpp index 1f53686..4b21ed9 100644 --- a/test/constraint/pt_line_distance/test.cpp +++ b/test/constraint/pt_line_distance/test.cpp @@ -1,18 +1,42 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(render_extended) { +TEST_CASE(free_in_3d_roundtrip) { + CHECK_LOAD("free_in_3d.slvs"); + CHECK_RENDER("free_in_3d.png"); + CHECK_SAVE("free_in_3d.slvs"); +} + +TEST_CASE(free_in_3d_migrate_from_v20) { + CHECK_LOAD("free_in_3d_v20.slvs"); + CHECK_RENDER("free_in_3d.png"); + CHECK_SAVE("free_in_3d.slvs"); +} + +TEST_CASE(reference_roundtrip) { + CHECK_LOAD("reference.slvs"); + CHECK_RENDER("reference.png"); + CHECK_SAVE("reference.slvs"); +} + +TEST_CASE(reference_migrate_from_v20) { + CHECK_LOAD("reference_v20.slvs"); + CHECK_RENDER("reference.png"); + CHECK_SAVE("reference.slvs"); +} + +TEST_CASE(extended_render) { CHECK_LOAD("extended.slvs"); CHECK_RENDER("extended.png"); } diff --git a/test/constraint/pt_on_circle/test.cpp b/test/constraint/pt_on_circle/test.cpp index c83a901..e54f651 100644 --- a/test/constraint/pt_on_circle/test.cpp +++ b/test/constraint/pt_on_circle/test.cpp @@ -1,12 +1,12 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); diff --git a/test/constraint/pt_on_face/normal.png b/test/constraint/pt_on_face/normal.png new file mode 100644 index 0000000..1f31b2a Binary files /dev/null and b/test/constraint/pt_on_face/normal.png differ diff --git a/test/constraint/pt_on_face/normal.slvs b/test/constraint/pt_on_face/normal.slvs new file mode 100644 index 0000000..03ee428 Binary files /dev/null and b/test/constraint/pt_on_face/normal.slvs differ diff --git a/test/constraint/pt_on_face/normal_v20.slvs b/test/constraint/pt_on_face/normal_v20.slvs new file mode 100644 index 0000000..e3c7212 Binary files /dev/null and b/test/constraint/pt_on_face/normal_v20.slvs differ diff --git a/test/constraint/pt_on_face/test.cpp b/test/constraint/pt_on_face/test.cpp index 298ad90..0f128cf 100644 --- a/test/constraint/pt_on_face/test.cpp +++ b/test/constraint/pt_on_face/test.cpp @@ -1,12 +1,12 @@ #include "harness.h" -// TEST_CASE(roundtrip) { -// CHECK_LOAD("normal.slvs"); -// CHECK_RENDER("normal.png"); -// CHECK_SAVE("normal.slvs"); -// } +TEST_CASE(normal_roundtrip) { + CHECK_LOAD("normal.slvs"); + CHECK_RENDER("normal.png"); + CHECK_SAVE("normal.slvs"); +} -// TEST_CASE(migrate_from_v20) { -// CHECK_LOAD("normal_v20.slvs"); -// CHECK_SAVE("normal.slvs"); -// } +TEST_CASE(normal_migrate_from_v20) { + CHECK_LOAD("normal_v20.slvs"); + CHECK_SAVE("normal.slvs"); +} diff --git a/test/constraint/pt_on_line/free_in_3d_v20.slvs b/test/constraint/pt_on_line/free_in_3d_v20.slvs new file mode 100644 index 0000000..bc5ecec Binary files /dev/null and b/test/constraint/pt_on_line/free_in_3d_v20.slvs differ diff --git a/test/constraint/pt_on_line/left_free_in_3d.png b/test/constraint/pt_on_line/left_free_in_3d.png new file mode 100644 index 0000000..f79bf70 Binary files /dev/null and b/test/constraint/pt_on_line/left_free_in_3d.png differ diff --git a/test/constraint/pt_on_line/left_free_in_3d.slvs b/test/constraint/pt_on_line/left_free_in_3d.slvs new file mode 100644 index 0000000..250f93c Binary files /dev/null and b/test/constraint/pt_on_line/left_free_in_3d.slvs differ diff --git a/test/constraint/pt_on_line/right_free_in_3d.png b/test/constraint/pt_on_line/right_free_in_3d.png new file mode 100644 index 0000000..0cf31c9 Binary files /dev/null and b/test/constraint/pt_on_line/right_free_in_3d.png differ diff --git a/test/constraint/pt_on_line/right_free_in_3d.slvs b/test/constraint/pt_on_line/right_free_in_3d.slvs new file mode 100644 index 0000000..dc5d221 Binary files /dev/null and b/test/constraint/pt_on_line/right_free_in_3d.slvs differ diff --git a/test/constraint/pt_on_line/test.cpp b/test/constraint/pt_on_line/test.cpp index c83a901..41781ad 100644 --- a/test/constraint/pt_on_line/test.cpp +++ b/test/constraint/pt_on_line/test.cpp @@ -1,13 +1,30 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } + +TEST_CASE(left_free_in_3d_roundtrip) { + CHECK_LOAD("left_free_in_3d.slvs"); + CHECK_RENDER("left_free_in_3d.png"); + CHECK_SAVE("left_free_in_3d.slvs"); +} + +TEST_CASE(right_free_in_3d_roundtrip) { + CHECK_LOAD("right_free_in_3d.slvs"); + CHECK_RENDER("right_free_in_3d.png"); + CHECK_SAVE("right_free_in_3d.slvs"); +} + +TEST_CASE(free_in_3d_migrate_from_v20) { + CHECK_LOAD("free_in_3d_v20.slvs"); + CHECK_SAVE("left_free_in_3d.slvs"); +} diff --git a/test/constraint/pt_plane_distance/reference.png b/test/constraint/pt_plane_distance/reference.png new file mode 100644 index 0000000..7c7aed0 Binary files /dev/null and b/test/constraint/pt_plane_distance/reference.png differ diff --git a/test/constraint/pt_plane_distance/reference.slvs b/test/constraint/pt_plane_distance/reference.slvs new file mode 100644 index 0000000..8e6cbf3 Binary files /dev/null and b/test/constraint/pt_plane_distance/reference.slvs differ diff --git a/test/constraint/pt_plane_distance/reference_v20.slvs b/test/constraint/pt_plane_distance/reference_v20.slvs new file mode 100644 index 0000000..9579a3d Binary files /dev/null and b/test/constraint/pt_plane_distance/reference_v20.slvs differ diff --git a/test/constraint/pt_plane_distance/test.cpp b/test/constraint/pt_plane_distance/test.cpp index c83a901..ace5d36 100644 --- a/test/constraint/pt_plane_distance/test.cpp +++ b/test/constraint/pt_plane_distance/test.cpp @@ -1,13 +1,25 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } + +TEST_CASE(reference_roundtrip) { + CHECK_LOAD("reference.slvs"); + CHECK_RENDER("reference.png"); + CHECK_SAVE("reference.slvs"); +} + +TEST_CASE(reference_migrate_from_v20) { + CHECK_LOAD("reference_v20.slvs"); + CHECK_RENDER("reference.png"); + CHECK_SAVE("reference.slvs"); +} diff --git a/test/constraint/pt_pt_distance/free_in_3d.png b/test/constraint/pt_pt_distance/free_in_3d.png new file mode 100644 index 0000000..55c4544 Binary files /dev/null and b/test/constraint/pt_pt_distance/free_in_3d.png differ diff --git a/test/constraint/pt_pt_distance/free_in_3d.slvs b/test/constraint/pt_pt_distance/free_in_3d.slvs new file mode 100644 index 0000000..c5b1af5 Binary files /dev/null and b/test/constraint/pt_pt_distance/free_in_3d.slvs differ diff --git a/test/constraint/pt_pt_distance/free_in_3d_v20.slvs b/test/constraint/pt_pt_distance/free_in_3d_v20.slvs new file mode 100644 index 0000000..e9b6d25 Binary files /dev/null and b/test/constraint/pt_pt_distance/free_in_3d_v20.slvs differ diff --git a/test/constraint/pt_pt_distance/reference.png b/test/constraint/pt_pt_distance/reference.png new file mode 100644 index 0000000..3ddc43b Binary files /dev/null and b/test/constraint/pt_pt_distance/reference.png differ diff --git a/test/constraint/pt_pt_distance/reference.slvs b/test/constraint/pt_pt_distance/reference.slvs new file mode 100644 index 0000000..8a3b2a3 Binary files /dev/null and b/test/constraint/pt_pt_distance/reference.slvs differ diff --git a/test/constraint/pt_pt_distance/reference_v20.slvs b/test/constraint/pt_pt_distance/reference_v20.slvs new file mode 100644 index 0000000..0888aa8 Binary files /dev/null and b/test/constraint/pt_pt_distance/reference_v20.slvs differ diff --git a/test/constraint/pt_pt_distance/test.cpp b/test/constraint/pt_pt_distance/test.cpp index c83a901..df34a00 100644 --- a/test/constraint/pt_pt_distance/test.cpp +++ b/test/constraint/pt_pt_distance/test.cpp @@ -1,13 +1,37 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } + +TEST_CASE(free_in_3d_roundtrip) { + CHECK_LOAD("free_in_3d.slvs"); + CHECK_RENDER("free_in_3d.png"); + CHECK_SAVE("free_in_3d.slvs"); +} + +TEST_CASE(free_in_3d_migrate_from_v20) { + CHECK_LOAD("free_in_3d_v20.slvs"); + CHECK_RENDER("free_in_3d.png"); + CHECK_SAVE("free_in_3d.slvs"); +} + +TEST_CASE(reference_roundtrip) { + CHECK_LOAD("reference.slvs"); + CHECK_RENDER("reference.png"); + CHECK_SAVE("reference.slvs"); +} + +TEST_CASE(reference_migrate_from_v20) { + CHECK_LOAD("reference_v20.slvs"); + CHECK_RENDER("reference.png"); + CHECK_SAVE("reference.slvs"); +} diff --git a/test/constraint/same_orientation/same_group.png b/test/constraint/same_orientation/same_group.png new file mode 100644 index 0000000..10f3b4f Binary files /dev/null and b/test/constraint/same_orientation/same_group.png differ diff --git a/test/constraint/same_orientation/same_group.slvs b/test/constraint/same_orientation/same_group.slvs new file mode 100644 index 0000000..1747c5a Binary files /dev/null and b/test/constraint/same_orientation/same_group.slvs differ diff --git a/test/constraint/same_orientation/test.cpp b/test/constraint/same_orientation/test.cpp index c83a901..c49b31c 100644 --- a/test/constraint/same_orientation/test.cpp +++ b/test/constraint/same_orientation/test.cpp @@ -1,13 +1,19 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } + +TEST_CASE(same_group_roundtrip) { + CHECK_LOAD("same_group.slvs"); + CHECK_RENDER("same_group.png"); + CHECK_SAVE("same_group.slvs"); +} diff --git a/test/constraint/symmetric/free_in_3d.png b/test/constraint/symmetric/free_in_3d.png new file mode 100644 index 0000000..0ebaf5a Binary files /dev/null and b/test/constraint/symmetric/free_in_3d.png differ diff --git a/test/constraint/symmetric/free_in_3d.slvs b/test/constraint/symmetric/free_in_3d.slvs new file mode 100644 index 0000000..ff95075 Binary files /dev/null and b/test/constraint/symmetric/free_in_3d.slvs differ diff --git a/test/constraint/symmetric/free_in_3d_v20.slvs b/test/constraint/symmetric/free_in_3d_v20.slvs new file mode 100644 index 0000000..a6a0cea Binary files /dev/null and b/test/constraint/symmetric/free_in_3d_v20.slvs differ diff --git a/test/constraint/symmetric/test.cpp b/test/constraint/symmetric/test.cpp index c83a901..c0e3caf 100644 --- a/test/constraint/symmetric/test.cpp +++ b/test/constraint/symmetric/test.cpp @@ -1,13 +1,25 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } + +TEST_CASE(free_in_3d_roundtrip) { + CHECK_LOAD("free_in_3d.slvs"); + CHECK_RENDER("free_in_3d.png"); + CHECK_SAVE("free_in_3d.slvs"); +} + +TEST_CASE(free_in_3d_migrate_from_v20) { + CHECK_LOAD("free_in_3d_v20.slvs"); + CHECK_RENDER("free_in_3d.png"); + CHECK_SAVE("free_in_3d.slvs"); +} diff --git a/test/constraint/symmetric_horiz/test.cpp b/test/constraint/symmetric_horiz/test.cpp index c83a901..e54f651 100644 --- a/test/constraint/symmetric_horiz/test.cpp +++ b/test/constraint/symmetric_horiz/test.cpp @@ -1,12 +1,12 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); diff --git a/test/constraint/symmetric_line/test.cpp b/test/constraint/symmetric_line/test.cpp index c83a901..e54f651 100644 --- a/test/constraint/symmetric_line/test.cpp +++ b/test/constraint/symmetric_line/test.cpp @@ -1,12 +1,12 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); diff --git a/test/constraint/symmetric_vert/test.cpp b/test/constraint/symmetric_vert/test.cpp index c83a901..e54f651 100644 --- a/test/constraint/symmetric_vert/test.cpp +++ b/test/constraint/symmetric_vert/test.cpp @@ -1,12 +1,12 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); diff --git a/test/constraint/where_dragged/free_in_3d.png b/test/constraint/where_dragged/free_in_3d.png new file mode 100644 index 0000000..cc92f24 Binary files /dev/null and b/test/constraint/where_dragged/free_in_3d.png differ diff --git a/test/constraint/where_dragged/free_in_3d.slvs b/test/constraint/where_dragged/free_in_3d.slvs new file mode 100644 index 0000000..c134f7e Binary files /dev/null and b/test/constraint/where_dragged/free_in_3d.slvs differ diff --git a/test/constraint/where_dragged/free_in_3d_v20.slvs b/test/constraint/where_dragged/free_in_3d_v20.slvs new file mode 100644 index 0000000..7ad175e Binary files /dev/null and b/test/constraint/where_dragged/free_in_3d_v20.slvs differ diff --git a/test/constraint/where_dragged/test.cpp b/test/constraint/where_dragged/test.cpp index c83a901..c0e3caf 100644 --- a/test/constraint/where_dragged/test.cpp +++ b/test/constraint/where_dragged/test.cpp @@ -1,13 +1,25 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } + +TEST_CASE(free_in_3d_roundtrip) { + CHECK_LOAD("free_in_3d.slvs"); + CHECK_RENDER("free_in_3d.png"); + CHECK_SAVE("free_in_3d.slvs"); +} + +TEST_CASE(free_in_3d_migrate_from_v20) { + CHECK_LOAD("free_in_3d_v20.slvs"); + CHECK_RENDER("free_in_3d.png"); + CHECK_SAVE("free_in_3d.slvs"); +} diff --git a/test/harness.cpp b/test/harness.cpp index 7c70d83..5df55dc 100644 --- a/test/harness.cpp +++ b/test/harness.cpp @@ -135,6 +135,15 @@ static std::string PrepareSavefile(std::string data) { } } + size_t spPos = data.find(' ', newline + 1); + if(spPos < nextNewline) { + std::string cmd = data.substr(newline + 1, spPos - newline - 1); + if(cmd == "Surface" || cmd == "SCtrl" || cmd == "TrimBy" || cmd == "AddSurface" || + cmd == "Curve" || cmd == "CCtrl" || cmd == "CurvePt" || cmd == "AddCurve") { + data.replace(newline + 1, nextNewline, nextNewline - newline - 1, ' '); + } + } + newline = nextNewline; } return data; diff --git a/test/request/arc_of_circle/test.cpp b/test/request/arc_of_circle/test.cpp index c83a901..e54f651 100644 --- a/test/request/arc_of_circle/test.cpp +++ b/test/request/arc_of_circle/test.cpp @@ -1,12 +1,12 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); diff --git a/test/request/circle/test.cpp b/test/request/circle/test.cpp index c83a901..e54f651 100644 --- a/test/request/circle/test.cpp +++ b/test/request/circle/test.cpp @@ -1,12 +1,12 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); diff --git a/test/request/cubic/test.cpp b/test/request/cubic/test.cpp index c83a901..e54f651 100644 --- a/test/request/cubic/test.cpp +++ b/test/request/cubic/test.cpp @@ -1,12 +1,12 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); diff --git a/test/request/cubic_periodic/test.cpp b/test/request/cubic_periodic/test.cpp index c83a901..e54f651 100644 --- a/test/request/cubic_periodic/test.cpp +++ b/test/request/cubic_periodic/test.cpp @@ -1,12 +1,12 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); diff --git a/test/request/datum_point/test.cpp b/test/request/datum_point/test.cpp index c83a901..e54f651 100644 --- a/test/request/datum_point/test.cpp +++ b/test/request/datum_point/test.cpp @@ -1,12 +1,12 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); diff --git a/test/request/line_segment/test.cpp b/test/request/line_segment/test.cpp index c83a901..e54f651 100644 --- a/test/request/line_segment/test.cpp +++ b/test/request/line_segment/test.cpp @@ -1,12 +1,12 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); diff --git a/test/request/ttf_text/test.cpp b/test/request/ttf_text/test.cpp index c83a901..e54f651 100644 --- a/test/request/ttf_text/test.cpp +++ b/test/request/ttf_text/test.cpp @@ -1,12 +1,12 @@ #include "harness.h" -TEST_CASE(roundtrip) { +TEST_CASE(normal_roundtrip) { CHECK_LOAD("normal.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs"); } -TEST_CASE(migrate_from_v20) { +TEST_CASE(normal_migrate_from_v20) { CHECK_LOAD("normal_v20.slvs"); CHECK_RENDER("normal.png"); CHECK_SAVE("normal.slvs");