aboutsummaryrefslogtreecommitdiff
path: root/googletest/test/gtest_xml_outfile2_test_.cc
diff options
context:
space:
mode:
Diffstat (limited to 'googletest/test/gtest_xml_outfile2_test_.cc')
-rw-r--r--googletest/test/gtest_xml_outfile2_test_.cc38
1 files changed, 36 insertions, 2 deletions
diff --git a/googletest/test/gtest_xml_outfile2_test_.cc b/googletest/test/gtest_xml_outfile2_test_.cc
index f9a2a6e9..4a76429c 100644
--- a/googletest/test/gtest_xml_outfile2_test_.cc
+++ b/googletest/test/gtest_xml_outfile2_test_.cc
@@ -30,6 +30,8 @@
// gtest_xml_outfile2_test_ writes some xml via TestProperty used by
// gtest_xml_outfiles_test.py
+#include <atomic>
+
#include "gtest/gtest.h"
class PropertyTwo : public testing::Test {
@@ -38,6 +40,38 @@ class PropertyTwo : public testing::Test {
void TearDown() override { RecordProperty("TearDownProp", 2); }
};
-TEST_F(PropertyTwo, TestSomeProperties) {
- RecordProperty("TestSomeProperty", 2);
+TEST_F(PropertyTwo, TestInt64ConvertibleProperties) {
+ float float_prop = 3.25;
+ RecordProperty("TestFloatProperty", float_prop);
+
+ double double_prop = 4.75;
+ RecordProperty("TestDoubleProperty", double_prop);
+
+ // Validate we can write an unsigned size_t as a property
+ size_t size_t_prop = 5;
+ RecordProperty("TestSizetProperty", size_t_prop);
+
+ bool bool_prop = true;
+ RecordProperty("TestBoolProperty", bool_prop);
+
+ char char_prop = 'A';
+ RecordProperty("TestCharProperty", char_prop);
+
+ int16_t int16_prop = 6;
+ RecordProperty("TestInt16Property", int16_prop);
+
+ int32_t int32_prop = 7;
+ RecordProperty("TestInt32Property", int32_prop);
+
+ int64_t int64_prop = 8;
+ RecordProperty("TestInt64Property", int64_prop);
+
+ enum Foo {
+ NINE = 9,
+ };
+ Foo enum_prop = NINE;
+ RecordProperty("TestEnumProperty", enum_prop);
+
+ std::atomic<int> atomic_int_prop(10);
+ RecordProperty("TestAtomicIntProperty", atomic_int_prop);
}