Skip to content

Commit

Permalink
Fix release tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerboa-app committed Aug 3, 2024
1 parent 586f6e4 commit b452381
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
12 changes: 9 additions & 3 deletions tests/regression/user-macos/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,16 @@ int main(int argv, char ** argc)

RNG rng;

std::vector<jGL::Transform> trans;

for (unsigned i = 0; i < 64; i++)
{
trans.push_back(jGL::Transform(rng.nextFloat(), rng.nextFloat(), 0.0, 0.1f));
shapes.push_back
(
std::make_shared<jGL::Shape>
(
jGL::Transform(rng.nextFloat(), rng.nextFloat(), 0.0, 0.1f),
trans[i],
glm::vec4(rng.nextFloat(), rng.nextFloat(), rng.nextFloat(), 1.0)
)
);
Expand Down Expand Up @@ -69,9 +72,12 @@ int main(int argv, char ** argc)
for (unsigned i = 0; i <shapes.size(); i++)
{
auto tr = circles->getTransform(std::to_string(i));
circles->getShape(std::to_string(i))->transform =
trans[i] = jGL::Transform
(
jGL::Transform(tr.x+dt*(rng.nextFloat()-0.5), tr.y+dt*(rng.nextFloat()-0.5), tr.theta, tr.scale)
tr.x+dt*(rng.nextFloat()-0.5),
tr.y+dt*(rng.nextFloat()-0.5),
tr.theta,
tr.scaleX
);
}

Expand Down
12 changes: 9 additions & 3 deletions tests/regression/user-mingw/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,16 @@ int main(int argv, char ** argc)

RNG rng;

std::vector<jGL::Transform> trans;

for (unsigned i = 0; i < 64; i++)
{
trans.push_back(jGL::Transform(rng.nextFloat(), rng.nextFloat(), 0.0, 0.1f));
shapes.push_back
(
std::make_shared<jGL::Shape>
(
jGL::Transform(rng.nextFloat(), rng.nextFloat(), 0.0, 0.1f),
trans[i],
glm::vec4(rng.nextFloat(), rng.nextFloat(), rng.nextFloat(), 1.0)
)
);
Expand Down Expand Up @@ -69,9 +72,12 @@ int main(int argv, char ** argc)
for (unsigned i = 0; i <shapes.size(); i++)
{
auto tr = circles->getTransform(std::to_string(i));
circles->getShape(std::to_string(i))->transform =
trans[i] = jGL::Transform
(
jGL::Transform(tr.x+dt*(rng.nextFloat()-0.5), tr.y+dt*(rng.nextFloat()-0.5), tr.theta, tr.scale)
tr.x+dt*(rng.nextFloat()-0.5),
tr.y+dt*(rng.nextFloat()-0.5),
tr.theta,
tr.scaleX
);
}

Expand Down
12 changes: 9 additions & 3 deletions tests/regression/user/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,16 @@ int main(int argv, char ** argc)

RNG rng;

std::vector<jGL::Transform> trans;

for (unsigned i = 0; i < 64; i++)
{
trans.push_back(jGL::Transform(rng.nextFloat(), rng.nextFloat(), 0.0, 0.1f));
shapes.push_back
(
std::make_shared<jGL::Shape>
(
jGL::Transform(rng.nextFloat(), rng.nextFloat(), 0.0, 0.1f),
trans[i],
glm::vec4(rng.nextFloat(), rng.nextFloat(), rng.nextFloat(), 1.0)
)
);
Expand Down Expand Up @@ -69,9 +72,12 @@ int main(int argv, char ** argc)
for (unsigned i = 0; i <shapes.size(); i++)
{
auto tr = circles->getTransform(std::to_string(i));
circles->getShape(std::to_string(i))->transform =
trans[i] = jGL::Transform
(
jGL::Transform(tr.x+dt*(rng.nextFloat()-0.5), tr.y+dt*(rng.nextFloat()-0.5), tr.theta, tr.scale)
tr.x+dt*(rng.nextFloat()-0.5),
tr.y+dt*(rng.nextFloat()-0.5),
tr.theta,
tr.scaleX
);
}

Expand Down

0 comments on commit b452381

Please sign in to comment.