summaryrefslogtreecommitdiffstats
path: root/googletest/src
diff options
context:
space:
mode:
authorChris Johnson <chrisjohnsonmail@gmail.com>2018-12-14 19:11:15 (GMT)
committerGitHub <noreply@github.com>2018-12-14 19:11:15 (GMT)
commit130e5aa86a7a71501cf8fa7cd6f507928f01bd79 (patch)
tree2bc11702641f6bcca31032b4c343238d7b9178f6 /googletest/src
parentfe14e3030737509c2b9f9adad80ff56f80e988a2 (diff)
parentb5f5c596a9915106c1ac36a3f89db4e0e49c07d1 (diff)
downloadgoogletest-130e5aa86a7a71501cf8fa7cd6f507928f01bd79.zip
googletest-130e5aa86a7a71501cf8fa7cd6f507928f01bd79.tar.gz
googletest-130e5aa86a7a71501cf8fa7cd6f507928f01bd79.tar.bz2
Merge pull request #2 from google/master
merge upstream/master into master
Diffstat (limited to 'googletest/src')
-rw-r--r--googletest/src/gtest-death-test.cc2
-rw-r--r--googletest/src/gtest.cc6
-rw-r--r--googletest/src/gtest_main.cc16
3 files changed, 21 insertions, 3 deletions
diff --git a/googletest/src/gtest-death-test.cc b/googletest/src/gtest-death-test.cc
index fb885e2..44247e8 100644
--- a/googletest/src/gtest-death-test.cc
+++ b/googletest/src/gtest-death-test.cc
@@ -246,7 +246,7 @@ static std::string DeathTestThreadWarning(size_t thread_count) {
msg << "detected " << thread_count << " threads.";
}
msg << " See "
- "https://github.com/abseil/googletest/blob/master/googletest/docs/"
+ "https://github.com/google/googletest/blob/master/googletest/docs/"
"advanced.md#death-tests-and-threads"
<< " for more explanation and suggested solutions, especially if"
<< " this is the last message you see before your test times out.";
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc
index a5581f7..34641af 100644
--- a/googletest/src/gtest.cc
+++ b/googletest/src/gtest.cc
@@ -3761,7 +3761,8 @@ void XmlUnitTestResultPrinter::OutputXmlTestInfo(::std::ostream* stream,
}
OutputXmlAttribute(stream, kTestcase, "status",
- test_info.should_run() ? "run" : "notrun");
+ result.Skipped() ? "skipped" :
+ test_info.should_run() ? "run" : "notrun");
OutputXmlAttribute(stream, kTestcase, "time",
FormatTimeInMillisAsSeconds(result.elapsed_time()));
OutputXmlAttribute(stream, kTestcase, "classname", test_case_name);
@@ -4126,6 +4127,7 @@ void JsonUnitTestResultPrinter::OutputJsonTestInfo(::std::ostream* stream,
}
OutputJsonKey(stream, kTestcase, "status",
+ result.Skipped() ? "SKIPPED" :
test_info.should_run() ? "RUN" : "NOTRUN", kIndent);
OutputJsonKey(stream, kTestcase, "time",
FormatTimeInMillisAsDuration(result.elapsed_time()), kIndent);
@@ -5363,7 +5365,7 @@ bool ShouldRunTestOnShard(int total_shards, int shard_index, int test_id) {
// each TestCase and TestInfo object.
// If shard_tests == true, further filters tests based on sharding
// variables in the environment - see
-// https://github.com/abseil/googletest/blob/master/googletest/docs/advanced.md
+// https://github.com/google/googletest/blob/master/googletest/docs/advanced.md
// . Returns the number of tests that should run.
int UnitTestImpl::FilterTests(ReactionToSharding shard_tests) {
const Int32 total_shards = shard_tests == HONOR_SHARDING_PROTOCOL ?
diff --git a/googletest/src/gtest_main.cc b/googletest/src/gtest_main.cc
index 2113f62..ee1ae52 100644
--- a/googletest/src/gtest_main.cc
+++ b/googletest/src/gtest_main.cc
@@ -30,8 +30,24 @@
#include <stdio.h>
#include "gtest/gtest.h"
+#ifdef ARDUINO
+void setup() {
+ // Since Arduino doesn't have a command line, fake out the argc/argv arguments
+ int argc = 1;
+ const auto arg0 = "PlatformIO";
+ char* argv0 = const_cast<char*>(arg0);
+ char** argv = &argv0;
+
+ testing::InitGoogleTest(&argc, argv);
+}
+
+void loop() { RUN_ALL_TESTS(); }
+
+#else
+
GTEST_API_ int main(int argc, char **argv) {
printf("Running main() from %s\n", __FILE__);
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
+#endif