Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some more tests #4876

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

some more tests #4876

wants to merge 1 commit into from

Conversation

supermerill
Copy link
Collaborator

Hi

I have written some tests that could make their way here.
I didn't had the time to test them since this merge, but i will do when possible.

@lordofhyphens
Copy link
Member

lordofhyphens commented Oct 22, 2019 via email

@AppVeyorBot
Copy link

Build Slic3r 1.3.0-master-2369 completed (commit a1844fcd04 by @)

@lordofhyphens
Copy link
Member

@supermerill I'm seeing some failures in the build output, was that expected?


SCENARIO("ExtrusionEntityCollection: Polygon flattening") {
srand(0xDEADBEEF); // consistent seed for test reproducibility.

// Generate one specific random path set and save it for later comparison
ExtrusionPaths nosort_path_set {random_paths()};
ExtrusionPaths nosort_path_set{ random_paths() };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this the result of an automatic code formatter?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably

@@ -138,8 +138,18 @@ SCENARIO("Print: Brim generation") {
config->set("first_layer_extrusion_width", 0.5);
auto print {Slic3r::Test::init_print({m}, model, config)};
print->make_brim();
THEN("Brim Extrusion collection has 12 loops in it") {
REQUIRE(print->brim.items_count() == 12);
double nbLoops = 6.0 / print->brim_flow().spacing();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the change here for the extrusion collection?

Copy link
Collaborator Author

@supermerill supermerill Dec 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made it that way because I wanted it to check if it makes the correct number of loop and not checking if the spacing is exactly what we tough about it (the layer heigh isn't set, btw)
I should had changes other tests also, i think that only this one bother me at the time because it is so large, a little difference in spacing can change the loop count.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants