Skip to content

Commit

Permalink
use less test steps, add debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienDoerner committed Oct 26, 2023
1 parent 0aae03c commit 3ca1463
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: crpropa-testing
on: [push, pull_request]
on: [pull_request]

jobs:
linux:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testing_OSX.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
CRPROPA_DATA_PATH: "/Users/runner/work/CRPropa3/CRPropa3/build/data"
run: |
cd build
make test
./testInteraciton
- name: Archive test results
if: always()
uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testing_ubuntu22.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: crpropa-testing_ubuntu22
on: [push, pull_request]
on: [pull_request]

jobs:
linux:
Expand Down
3 changes: 3 additions & 0 deletions test/testInteraction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -763,13 +763,16 @@ TEST(EMPairProduction, secondaries) {
if (c.isActive())
continue;

std::cout << "i = " << i << " has an inactive candidate with " << c.secondaries.size() << "secondaries \n";

// expect 2 secondaries
EXPECT_EQ(c.secondaries.size(), 2);

// expect electron / positron with energies 0 < E < Ephoton
double Etot = 0;
for (int j = 0; j < c.secondaries.size(); j++) {
ref_ptr<Candidate> s = c.secondaries[j];
std::cout << "\t secondary #" << j << " works \n";
EXPECT_EQ(abs(s->current.getId()), 11);
EXPECT_GT(s->current.getEnergy(), 0);
EXPECT_LT(s->current.getEnergy(), Ep);
Expand Down

0 comments on commit 3ca1463

Please sign in to comment.