summaryrefslogtreecommitdiff
path: root/tests/test1.cpp
diff options
context:
space:
mode:
authorDennis Brentjes <d.brentjes@gmail.com>2016-08-28 15:19:31 +0200
committerDennis Brentjes <d.brentjes@gmail.com>2016-08-28 15:19:31 +0200
commitd86042141ef0a0e77935f4b48d1a627fc1ec776b (patch)
tree4bc95d561c60306d1152f71aa53bd18d9229f172 /tests/test1.cpp
downloadconfigpp-d86042141ef0a0e77935f4b48d1a627fc1ec776b.tar.gz
configpp-d86042141ef0a0e77935f4b48d1a627fc1ec776b.tar.bz2
configpp-d86042141ef0a0e77935f4b48d1a627fc1ec776b.zip
Initial commit, allows for storing simpel values and boost::hana adapted structs at "key"HEADmaster
Diffstat (limited to 'tests/test1.cpp')
-rw-r--r--tests/test1.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/test1.cpp b/tests/test1.cpp
new file mode 100644
index 0000000..fedcb48
--- /dev/null
+++ b/tests/test1.cpp
@@ -0,0 +1,19 @@
+
+#include "configpp.hpp"
+
+struct Data {
+ int i;
+ float f;
+ std::string str;
+};
+
+BOOST_HANA_ADAPT_STRUCT(Data, i, f, str);
+
+int main() {
+ configpp::Config& config = configpp::Config::get("configpp_test1");
+
+ config.set("int", 1);
+ config.set("float", 1.0f);
+ config.set("string", "yolo");
+ config.set("struct", Data{1, 1.0f, "yolo"});
+}