Skip to content

Commit b7ae8e4

Browse files
committed
Update astronomy_test.cpp content
1 parent 20d2696 commit b7ae8e4

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

test/static/astronomy_test.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,36 +19,29 @@
1919
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
// SOFTWARE.
22-
2322
#include "test_tools.h"
2423
#include <mp-units/systems/astronomy.h>
2524
#include <mp-units/systems/si.h>
2625

2726
namespace {
28-
2927
using namespace mp_units;
3028
using namespace mp_units::astronomy::unit_symbols;
3129
using namespace mp_units::si::unit_symbols;
3230
using mp_units::astronomy::unit_symbols::a;
33-
3431
// time units
3532
static_assert(1. * D == 86'400. * s);
36-
static_assert(approx_equal(1. * D_sid, (86'164'0905. / 1'000'000.) * s));
33+
static_assert(approx_equal(1. * D_sid, 86'164.0905 * s));
3734
static_assert(approx_equal(1. * a, 365.25 * D));
3835
static_assert(approx_equal(1. * a, 31'557'600. * s));
3936
static_assert(approx_equal(1. * a_trop, 365.242189 * D));
4037
static_assert(1. * c == 100. * a);
4138
static_assert(1. * ka == 1000. * a);
42-
4339
// length units
4440
static_assert(1. * LD == 384'399. * km);
4541
static_assert(1. * ly == 9'460'730'472'580'800. * m);
46-
4742
// spectral flux density
4843
static_assert(approx_equal(1. * Jy, 1e-26 * W / m2 / Hz));
49-
5044
// legacy constants
5145
static_assert(approx_equal(1. * k, 1'720'209'895. / 100'000'000'000. * pow<3, 2>(iau::astronomical_unit) /
5246
pow<1, 2>(iau::solar_mass) / D));
53-
5447
} // namespace

0 commit comments

Comments
 (0)