summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Gilli <julien.gilli@joyent.com>2015-02-16 15:38:57 -0800
committerJulien Gilli <julien.gilli@joyent.com>2015-02-16 16:15:51 -0800
commit2b095bb76c62d2e27f0fb9ca716f17198e925f62 (patch)
treedcc8953c1841bda478b0729d0a0c71674e82582c
parenta6bdd8fd07c71298f6e21026939766ef80dd218e (diff)
downloadnode-2b095bb76c62d2e27f0fb9ca716f17198e925f62.tar.gz
deps: add test for V8 version in profiler's log
431eb172f97434a3b0868a610bc14d8ff7d9efd9 had integrated the addition of V8's version in V8's profiler log files, without backporting the test that was included in the original change (https://codereview.chromium.org/806143002). This commit backports this test. The newly added test was tested with https://github.com/joyent/node/pull/9208.
-rw-r--r--deps/v8/test/cctest/test-log.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/deps/v8/test/cctest/test-log.cc b/deps/v8/test/cctest/test-log.cc
index d72e6f0e1..680021508 100644
--- a/deps/v8/test/cctest/test-log.cc
+++ b/deps/v8/test/cctest/test-log.cc
@@ -42,6 +42,7 @@
#include "src/natives.h"
#include "src/utils.h"
#include "src/v8threads.h"
+#include "src/version.h"
#include "src/vm-state-inl.h"
#include "test/cctest/cctest.h"
@@ -493,3 +494,17 @@ TEST(EquivalenceOfLoggingAndTraversal) {
CHECK(false);
}
}
+
+TEST(LogVersion) {
+ ScopedLoggerInitializer initialize_logger;
+ bool exists = false;
+ i::Vector<const char> log(
+ i::ReadFile(initialize_logger.StopLoggingGetTempFile(), &exists, true));
+ CHECK(exists);
+ i::EmbeddedVector<char, 100> ref_data;
+ i::SNPrintF(ref_data, "v8-version,%d,%d,%d,%d,%d", i::Version::GetMajor(),
+ i::Version::GetMinor(), i::Version::GetBuild(),
+ i::Version::GetPatch(), i::Version::IsCandidate());
+ CHECK_NE(NULL, StrNStr(log.start(), ref_data.start(), log.length()));
+ log.Dispose();
+}