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

FIX: remove wrong tests in test_value.cpp

parent 640bb8c3
No related branches found
No related tags found
1 merge request!24API: Introduce value and datatype structs to Extern C
Pipeline #13686 passed
Pipeline: caosdb-cppinttest

#13687

    ...@@ -153,30 +153,24 @@ TEST(test_value, test_abstract_value) { ...@@ -153,30 +153,24 @@ TEST(test_value, test_abstract_value) {
    vals.push_back(num); vals.push_back(num);
    } }
    Value value(vals); Value value(vals);
    EXPECT_EQ("", value.ToString());
    EXPECT_TRUE(value.IsVector()); EXPECT_TRUE(value.IsVector());
    AbstractValue *abstract_value = &value; AbstractValue *abstract_value = &value;
    EXPECT_EQ("", abstract_value->ToString());
    EXPECT_TRUE(abstract_value->IsVector()); EXPECT_TRUE(abstract_value->IsVector());
    Value value2(*abstract_value); Value value2(*abstract_value);
    EXPECT_EQ("", value2.ToString());
    EXPECT_TRUE(value2.IsVector()); EXPECT_TRUE(value2.IsVector());
    ScalarValue scalar_value = value.GetAsVector().at(2); ScalarValue scalar_value = value.GetAsVector().at(2);
    EXPECT_TRUE(scalar_value.IsDouble()); EXPECT_TRUE(scalar_value.IsDouble());
    EXPECT_EQ("", scalar_value.ToString());
    EXPECT_EQ(scalar_value.GetAsDouble(), 27.5); EXPECT_EQ(scalar_value.GetAsDouble(), 27.5);
    AbstractValue *abstract_scalar_value = &scalar_value; AbstractValue *abstract_scalar_value = &scalar_value;
    EXPECT_EQ("", abstract_scalar_value->ToString());
    EXPECT_TRUE(abstract_scalar_value->IsDouble()); EXPECT_TRUE(abstract_scalar_value->IsDouble());
    EXPECT_EQ(abstract_scalar_value->GetAsDouble(), 27.5); EXPECT_EQ(abstract_scalar_value->GetAsDouble(), 27.5);
    Value scalar_value2(*abstract_scalar_value); Value scalar_value2(*abstract_scalar_value);
    EXPECT_TRUE(scalar_value2.IsDouble()); EXPECT_TRUE(scalar_value2.IsDouble());
    EXPECT_EQ("", scalar_value2.ToString());
    EXPECT_EQ(scalar_value2.GetAsDouble(), 27.5); EXPECT_EQ(scalar_value2.GetAsDouble(), 27.5);
    } }
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment