Functions
hex_test.cc File Reference
#include "fhiclcpp/ParameterSet.h"
#include <cassert>
#include <string>

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

int main ( void  )

Definition at line 7 of file hex_test.cc.

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
static constexpr double ps
Definition: Units.h:99