Skip to content

Commit

Permalink
Enable tests
Browse files Browse the repository at this point in the history
  • Loading branch information
terasakisatoshi committed Dec 24, 2024
1 parent 8f86cdd commit 6e2a3d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/sparseir/augment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class TauConst : public AbstractAugmentation {
}

std::complex<double> operator()(MatsubaraFreq<Fermionic> n) const override {
std::invalid_argument("TauConst is not a Fermionic basis.");
throw std::invalid_argument("TauConst is not a Fermionic basis.");
return std::numeric_limits<std::complex<double>>::quiet_NaN();
}

Expand Down
10 changes: 6 additions & 4 deletions test/augment.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ TEST_CASE("SparseIR Basis Functions", "[SparseIR]")
REQUIRE_THROWS_AS(tc(321), std::domain_error);

REQUIRE(tc(100) == 1 / std::sqrt(123));
//REQUIRE(tc(MatsubaraFreq(0)) == std::sqrt(123));
//REQUIRE(tc(MatsubaraFreq(92)) == 0.0);
//REQUIRE_THROWS_AS(tc(MatsubaraFreq(93)), std::runtime_error);

MatsubaraFreq<Bosonic> freq0(0);
MatsubaraFreq<Bosonic> freq92(92);
REQUIRE(tc(freq0) == std::sqrt(123));
REQUIRE(tc(freq92) == 0.0);
MatsubaraFreq<Fermionic> freq93(93);
REQUIRE_THROWS_AS(tc(freq93), std::invalid_argument);
//REQUIRE(sparseir::deriv(tc)(4.2) == 0.0);
//REQUIRE(sparseir::deriv(tc, 0) == tc);
}
Expand Down

0 comments on commit 6e2a3d1

Please sign in to comment.