diff options
author | David Robillard <d@drobilla.net> | 2021-02-20 10:11:33 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-03-08 23:36:35 -0500 |
commit | c579186c5dd4e11bffddd353cef8978a66ef9c10 (patch) | |
tree | b89f1059d161872ded394a5c620a3b4f156f7972 /bindings | |
parent | c7a827b07898551611d43f92cf4e2fa53595957a (diff) | |
download | serd-c579186c5dd4e11bffddd353cef8978a66ef9c10.tar.gz serd-c579186c5dd4e11bffddd353cef8978a66ef9c10.tar.bz2 serd-c579186c5dd4e11bffddd353cef8978a66ef9c10.zip |
WIP: Simplify node construction
Diffstat (limited to 'bindings')
-rw-r--r-- | bindings/cpp/include/serd/serd.hpp | 7 | ||||
-rw-r--r-- | bindings/cpp/test/test_serd_hpp.cpp | 3 |
2 files changed, 4 insertions, 6 deletions
diff --git a/bindings/cpp/include/serd/serd.hpp b/bindings/cpp/include/serd/serd.hpp index 3e90e6b1..95abcc04 100644 --- a/bindings/cpp/include/serd/serd.hpp +++ b/bindings/cpp/include/serd/serd.hpp @@ -128,10 +128,9 @@ enum class NodeType { /// @copydoc SerdNodeFlag enum class NodeFlag { - has_newline = SERD_HAS_NEWLINE, ///< @copydoc SERD_HAS_NEWLINE - has_quote = SERD_HAS_QUOTE, ///< @copydoc SERD_HAS_QUOTE - has_datatype = SERD_HAS_DATATYPE, ///< @copydoc SERD_HAS_DATATYPE - has_language = SERD_HAS_LANGUAGE ///< @copydoc SERD_HAS_LANGUAGE + is_long_literal = SERD_IS_LONG_LITERAL, ///< @copydoc SERD_IS_LONG_LITERAL + has_datatype = SERD_HAS_DATATYPE, ///< @copydoc SERD_HAS_DATATYPE + has_language = SERD_HAS_LANGUAGE ///< @copydoc SERD_HAS_LANGUAGE }; /// Bitwise OR of #NodeFlag values diff --git a/bindings/cpp/test/test_serd_hpp.cpp b/bindings/cpp/test/test_serd_hpp.cpp index 24e663fa..e3721e09 100644 --- a/bindings/cpp/test/test_serd_hpp.cpp +++ b/bindings/cpp/test/test_serd_hpp.cpp @@ -342,8 +342,7 @@ test_nodes() "http://example.org/rel/uri"); const auto string = serd::make_string("hello\n\"world\""); - assert(string.flags() == - (serd::NodeFlag::has_newline | serd::NodeFlag::has_quote)); + assert(!string.flags()); const auto number = serd::make_integer(42); assert(number.flags() == serd::NodeFlag::has_datatype); |