hex_test.cc
Go to the documentation of this file.
2 
3 #include <cassert>
4 #include <string>
5 
6 int
7 main()
8 {
9  std::string text(
10  "small: 0xF large: 0X1000 very_large: 0xabcdefabcdefabcdef ");
11  text.append("small_bin: 0b01 large_bin: 0b01010101");
12 
13  auto const ps = fhicl::ParameterSet::make(text);
14  assert(ps.get<int>("small") == 15);
15  assert(ps.get<unsigned long>("large") == 0x1000);
16  assert(ps.get<std::string>("very_large") == "3.169232504802520059375e21");
17  assert(ps.get<int>("small_bin") == 1);
18  assert(ps.get<unsigned long>("large_bin") == 85);
19 }
std::string string
Definition: nybbler.cc:12
static ParameterSet make(intermediate_table const &tbl)
Definition: ParameterSet.cc:68
int main()
Definition: hex_test.cc:7
static constexpr double ps
Definition: Units.h:99