diff --git a/README.md b/README.md index e4ff33b..d448a0b 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,22 @@ This is for: * The [questdb-confstr](./questdb-confstr) crate * and its bindings for C [questdb-confstr-ffi](./questdb-confstr-ffi) + +## Dev notes + +To build and test: + +``` +cargo clean +cargo build +cargo test +cd questdb-confstr-ffi/cpp_test +./compile +./run +``` + +In addition, before pushing a PR, please run: +``` +cargo fmt --all +cargo clippy --all-targets -- -D warnings +``` \ No newline at end of file diff --git a/questdb-confstr-ffi/cpp_test/test.cpp b/questdb-confstr-ffi/cpp_test/test.cpp index decca7a..fd4188c 100644 --- a/questdb-confstr-ffi/cpp_test/test.cpp +++ b/questdb-confstr-ffi/cpp_test/test.cpp @@ -30,6 +30,8 @@ #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN #include "doctest.hpp" +using namespace questdb::conf_str; + TEST_CASE("basic no params") { const auto c1 = conf_str::parse("http"); diff --git a/questdb-confstr-ffi/include/questdb/conf_str.hpp b/questdb-confstr-ffi/include/questdb/conf_str.hpp index fc3bca1..cfb9452 100644 --- a/questdb-confstr-ffi/include/questdb/conf_str.hpp +++ b/questdb-confstr-ffi/include/questdb/conf_str.hpp @@ -5,6 +5,8 @@ #include #include +namespace questdb::conf_str +{ class parse_err { @@ -157,3 +159,5 @@ class conf_str conf_str(::questdb_conf_str* impl) : _impl(impl) {} ::questdb_conf_str* _impl; }; + +} diff --git a/questdb-confstr/tests/tests.rs b/questdb-confstr/tests/tests.rs index c304d9f..951b223 100644 --- a/questdb-confstr/tests/tests.rs +++ b/questdb-confstr/tests/tests.rs @@ -22,8 +22,8 @@ * ******************************************************************************/ -use std::collections::HashMap; use questdb_confstr::{parse_conf_str, ErrorKind, ParsingError}; +use std::collections::HashMap; #[test] fn empty() -> Result<(), ParsingError> {