Skip to content
Snippets Groups Projects
Commit eafd23b9 authored by Timo Koch's avatar Timo Koch
Browse files

[cleanup] Remove test for deprecated gcd/lcm functions

parent 365ca384
No related branches found
No related tags found
1 merge request!825[cleanup] Deprecate gcd/lcm, advertise C++17 STL solution
Pipeline #27338 passed
......@@ -203,9 +203,6 @@ dune_add_test(SOURCES genericiterator_compile_fail.cc
EXPECT_COMPILE_FAIL
LABELS quick)
dune_add_test(SOURCES gcdlcmtest.cc
LABELS quick)
dune_add_test(SOURCES hybridutilitiestest.cc
LINK_LIBRARIES dunecommon
LABELS quick)
......
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <iostream>
#include <dune/common/gcd.hh>
#include <dune/common/lcm.hh>
void test()
{
static_assert((Dune::Gcd<2*2*2*5*5*5*11, 2*2*5*13>::value == 2*2*5),
"gcd not working properly");
static_assert((Dune::Lcm<11,3>::value == 33),
"lcm not working properly");
static_assert((Dune::Lcm<18,15>::value == 18*15/3),
"lcm not working properly");
static_assert((Dune::Lcm<10800,Dune::Lcm<36000,7680>::value>::value==1728000),
"lcm not working properly");
}
int main()
{
std::cout<<" gcd(2,5)="<<Dune::Gcd<2,5>::value<<" gcd(3, 18)="
<<Dune::Gcd<3,18>::value<<" gcd("<<2*2*2*5*5*5*11<<", "
<< 2*2*5*13<<")="<<Dune::Gcd<2*2*2*5*5*5*11, 2*2*5*13>::value
<<std::endl;
std::cout<<" lcm(18,15)="<<Dune::Lcm<18,15>::value
<<" lcm(10800,36000,7680)="<<Dune::Lcm<10800,Dune::Lcm<36000,7680>::value>::value<<std::endl;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment