Commit e8186979 authored by jameslahm's avatar jameslahm Committed by V8 LUCI CQ

[test] Move cctest/test-version to unittests/utils/

... version-unittest.

Bug: v8:12781
Change-Id: If5bd862533c265bb87ee21008da27e8defebe863
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3675734
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80800}
parent c78d7a9b
......@@ -246,7 +246,6 @@ v8_source_set("cctest_sources") {
"test-usecounters.cc",
"test-utils.cc",
"test-verifiers.cc",
"test-version.cc",
"test-weakmaps.cc",
"test-weaksets.cc",
"test-web-snapshots.cc",
......
......@@ -446,6 +446,7 @@ v8_source_set("unittests_sources") {
"utils/locked-queue-unittest.cc",
"utils/sparse-bit-vector-unittest.cc",
"utils/utils-unittest.cc",
"utils/version-unittest.cc",
"zone/zone-allocator-unittest.cc",
"zone/zone-chunk-list-unittest.cc",
"zone/zone-unittest.cc",
......
......@@ -25,15 +25,17 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "src/init/v8.h"
#include "src/utils/version.h"
#include "test/cctest/cctest.h"
#include "src/init/v8.h"
#include "test/unittests/test-utils.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace v8 {
namespace internal {
using VersionTest = ::testing::Test;
void SetVersion(int major, int minor, int build, int patch,
const char* embedder, bool candidate, const char* soname) {
Version::major_ = major;
......@@ -68,8 +70,7 @@ static void CheckVersion(int major, int minor, int build, int patch,
CHECK_EQ(0, strcmp(soname, soname_str.begin()));
}
TEST(VersionString) {
TEST_F(VersionTest, VersionString) {
CheckVersion(0, 0, 0, 0, "", false, "0.0.0", "libv8-0.0.0.so");
CheckVersion(0, 0, 0, 0, "", true, "0.0.0 (candidate)",
"libv8-0.0.0-candidate.so");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment