Skip to content
Snippets Groups Projects
Verified Commit 6c217189 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

WIP: tests for f-int64

parent 578dd606
Branches
Tags
1 merge request!14Tests for f-int64
Pipeline #12858 failed
This commit is part of merge request !14. Comments created here will be created in the context of that merge request.
[requires]
caosdb/0.0.13
caosdb/0.0.15
gtest/1.11.0
[generators]
......
......@@ -32,7 +32,7 @@
#include <boost/filesystem/path.hpp> // for path
#include <boost/filesystem/path_traits.hpp> // for filesystem
#include <cstddef> // for size_t
#include <cstdint> // for int32_t
#include <cstdint> // for int64_t, int32_t
#include <gtest/gtest-message.h> // for Message
#include <gtest/gtest-test-part.h> // for TestPartResult
#include <gtest/gtest_pred_impl.h> // for AssertionResult
......@@ -133,10 +133,16 @@ auto test_transaction::getValueAs<double>(const Value &value) -> double {
}
template <>
auto test_transaction::getValueAs<int32_t>(const Value &value) -> int32_t {
auto test_transaction::getValueAs<int64_t>(const Value &value) -> int64_t {
return value.AsInteger();
}
template <>
auto test_transaction::getValueAs<int32_t>(const Value &value) -> int32_t {
return static_cast<int32_t>(value.AsInteger());
}
template <>
auto test_transaction::getValueAs<bool>(const Value &value) -> bool {
return value.AsBool();
......@@ -756,6 +762,8 @@ TEST_F(test_transaction, test_numeric_values) {
test_numeric_values_impl<int32_t>(AtomicDataType::INTEGER);
test_transaction::DeleteEntities();
test_numeric_values_impl<bool>(AtomicDataType::BOOLEAN);
test_transaction::DeleteEntities();
test_numeric_values_impl<int64_t>(AtomicDataType::INTEGER);
}
// /*
......@@ -1070,7 +1078,7 @@ TEST_F(test_transaction, test_full_workflow) {
experiment_rec.AppendProperty(volt_for_rt);
notes_for_rt2.SetValue("This is important!");
experiment_rec.AppendProperty(notes_for_rt2);
part_for_rt3.SetValue(static_cast<int32_t>(6));
part_for_rt3.SetValue(6);
experiment_rec.AppendProperty(part_for_rt3);
succ_for_rt.SetValue(true);
experiment_rec.AppendProperty(succ_for_rt);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment