Commit Graph

46 Commits

Author SHA1 Message Date
jameslahm
552ffd38dc [test] Migrate cctest/test-api-accessors.cc to unittests/
... api/accessor-unittest.cc.

- Add IsInt32, IsString, IsUndefined matcher in
testing/gmock-support.h.

Bug: v8:12781
Change-Id: I764491d7643e35fb8bc1621e857873aa24f64ccd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3593573
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80577}
2022-05-17 08:27:55 +00:00
Jakob Kummerow
dba4f45166 [test][cleanup] Fix -Wshadow warnings in unittests
Bug: v8:12244,v8:12245
Change-Id: I0bcc6dcc148138a6c3b2c87fd8819a9e809e5668
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3182230
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77080}
2021-09-27 08:59:01 +00:00
Milad Fa
eac21d572e Fix config visibility violation in //testing/gmock
This is a port of the following 2 CL on Chromium:
https://crrev.com/c/3139927
https://crrev.com/c/2672580

Bug: gn:252
Change-Id: I7c0636fad9d9f07c73e5f77b9b0a342d0326800f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3145613
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76725}
2021-09-08 12:11:23 +00:00
Victor Gomes
bd80ad89a1 [macros] Upstream Google3 changes
- Disables FRIEND_TEST
- Removes gtest_prod.h dependency

Change-Id: I614f633749f3197989ac4a0d9d5faa6ec03ed59d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2982481
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75372}
2021-06-24 16:36:14 +00:00
Sylvain Defresne
92e6d33170 build: Remove no-op calls to set_sources_assignment_filter
Chromiun no longer use set_sources_assignment_filter() anywhere in the
build, so these are no longer needed.

Bug: chromium:1018739
Change-Id: I7b33612d925563ebca0d93a7d3c9183d7305b7b0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2456988
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70405}
2020-10-08 14:44:01 +00:00
Victor Costan
b78080ddad Roll v8/third_party/googletest/src/ 10b1902d8..e3f0319d8 (43 commits)
10b1902d89..e3f0319d89

This CL also removes references to gmock-generated-matchers.h, which was
removed from googletest in commit
41b5f149ab306e96b5b2faf523505d75acffd98a, and to
gmock-generated-function-mockers.h, which was removed from googletest in
commit fbf67a70d07543f40832d0cd7a58f304bc6ab1d1.

$ git log 10b1902d8..e3f0319d8 --date=short --no-merges --format='%ad %ae %s'
2020-04-01 absl-team Googletest export
2020-03-30 absl-team Googletest export
2020-03-23 absl-team Googletest export
2020-03-24 krystian.kuzniarek remove chapters on Autotools, Meson and plain Makefiles
2020-03-24 krystian.kuzniarek remove dead code in googletest-output-test
2020-03-24 pkryger Swap settimer and sigaction calls to avoid SIGPROF
2020-03-20 absl-team Googletest export
2019-07-11 adam.f.badura Add support for std::function in MockFunction (#2277)
2019-12-26 adam.f.badura Add tests for MockFunction deduction (#2277)
2020-03-17 absl-team Googletest export
2020-03-16 dmauro Googletest export
2020-03-13 absl-team Googletest export
2020-03-06 absl-team Googletest export
2020-03-03 absl-team Googletest export
2020-03-03 absl-team Googletest export
2020-03-11 romain.geissler Make sure IsATTY does not clobber errno.
2020-02-27 absl-team Googletest export
2020-02-25 absl-team Googletest export
2020-02-19 absl-team Googletest export
2020-02-21 johan.mabille Fixed warnings
2020-02-12 absl-team Googletest export
2020-02-11 absl-team Googletest export
2020-02-11 absl-team Googletest export
2020-02-10 absl-team Googletest export
2020-02-10 absl-team Googletest export
2020-02-07 absl-team Googletest export
2020-02-07 absl-team Googletest export
2020-02-06 durandal Googletest export
2020-02-05 absl-team Googletest export
2020-02-05 absl-team Googletest export
2020-02-03 absl-team Googletest export
2020-02-03 absl-team Googletest export
2020-01-31 absl-team Googletest export
2020-01-31 absl-team Googletest export
2020-01-29 absl-team Googletest export
2020-01-27 absl-team Googletest export
2020-01-27 absl-team Googletest export
2020-01-27 absl-team Googletest export
2020-01-24 absl-team Googletest export
2020-01-24 absl-team Googletest export
2020-01-23 absl-team Googletest export
2020-01-29 krystian.kuzniarek remove a dead reference to the Autotools script
2019-11-11 krystian.kuzniarek add documentation for the premature-exit-file protocol

Created with:
  roll-dep v8/third_party/googletest/src

Bug: chromium:1070043
Change-Id: If63ebef3355a8e9da53cfa131c50ba03a0ea650d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2150068
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67138}
2020-04-15 07:23:10 +00:00
Yang Guo
04a6f872f2 Use relative paths to OWNERS files
R=machenbach@chromium.org

Bug: chromium:992584
Change-Id: I301013731a502689f2edd5c90e5e7bf2136198c5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1745337
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63159}
2019-08-12 13:52:52 +00:00
Yang Guo
088eda6235 Add missing owners files
R=rmcilroy@chromium.org

Bug: v8:9247
Change-Id: I2644436fd44ecf0e206a81cf28071cccb49793df
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1635690
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61936}
2019-05-31 07:21:01 +00:00
Victor Costan
4d64ee24bf Remove dummy files created for rolling googletest.
Change-Id: I8db5eb77d0287d665ab2b7c41f8289d47389d0d0
Reviewed-on: https://chromium-review.googlesource.com/977579
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52237}
2018-03-27 05:55:56 +00:00
Victor Costan
539e907258 Roll googletest to 1.8.0+.
This is the V8 equivalent to https://crrev.com/2779193002 and must be landed
before //build/secondary/{gtest,gmock} are removed from Chromium. This started
out as https://crrev.com/2847693002

The changes in tools/ were authored by yangguo@chromium.org and
initially shared in http://crrev.com/2849783003.

GoogleTest (gtest) and GoogleMock (gmock) are now hosted into the same
googletest repository. In order to cope with this, the googletest
repository is now sourced at third_party/googletest.

The file/directory layout of Google Test is not yet considered stable.
To minimize disruption while Google Test stabilizes, Chromium code will
be insulated from third_party/googletest.

* testing/gtest/include/gtest/ and testing/gmock/include/gmock have
  been populated with headers that forward into the appropriate
  locations of third_party/googletest

* testing/BUILD.gn has been populated with the targets
  //testing/gtest(:gtest_main) and //testing/gmock(:gmock_main),
  which depend on the appropriate //third_party/googletest targets.

All Chromium code should keep depending on the targets and
headers in testing/{gtest,gmock} for now.

BUG=chromium:630705

Change-Id: I12b07ae78c8039aeff6ada7a3335e4e2b5d308ab
Reviewed-on: https://chromium-review.googlesource.com/639953
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52170}
2018-03-23 07:54:27 +00:00
Victor Costan
f6bf3ce92e Add testing/{gtest,gmock}/dummy to facilitate rolling googletest.
googletest's directory structure has completely changed, and trybots
have trouble with the roll CL https://crrev.com/c/639953 because of
https://crbug.com/823586.

This CL works aroud the bug above, using the same method as
https://pdfium-review.googlesource.com/c/pdfium/+/29011 which helped
land https://pdfium-review.googlesource.com/c/pdfium/+/28791.

Bug: chromium:823586
Change-Id: Iffce1277c6b73b5cea96465a6035380cba0d103c
Reviewed-on: https://chromium-review.googlesource.com/974917
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52161}
2018-03-22 18:23:01 +00:00
Yang Guo
b1d09bf6c5 [gyp] move build targets for tests to gypfiles.
Bug: v8:7335
Change-Id: I6610bba00ff558de5826934c326fc2873c91a1a3
Reviewed-on: https://chromium-review.googlesource.com/890742
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50944}
2018-01-30 06:31:00 +00:00
tzik
497e10bf65 Use GTEST_LANG_CXX11 in V8
For GYP build, V8 configures gtest and gmock in its //testing, and OTOH for
GN build, it imports BUILD.gn from chromium and uses other configurations
from its own. However, a recent chromium change on the BUILD.gn requires
//testing update too. That prevents //build roll of V8.

BUG=chromium:630299

Review-Url: https://codereview.chromium.org/2179743002
Cr-Commit-Position: refs/heads/master@{#38021}
2016-07-25 13:06:42 +00:00
sergiyb
9088719ee5 Converted V8 CQ config to proto-format
This will land with https://chromereviews.googleplex.com/202967013

R=akuegel@chromium.org, machenbach@chromium.org
BUG=471767
NOTRY=true
LOG=N

Review URL: https://codereview.chromium.org/1161873004

Cr-Commit-Position: refs/heads/master@{#28684}
2015-05-28 15:02:53 +00:00
sergiyb
4aeeb01702 Use OAuth for accessing Rietveld
R=machenbach@chromium.org, tandrii@chromium.org
BUG=489483
LOG=n
NOTRY=true

Review URL: https://codereview.chromium.org/1150333002

Cr-Commit-Position: refs/heads/master@{#28602}
2015-05-22 18:48:21 +00:00
sergiyb
dd26fbf2b5 Removed project_bases_legacy_from_git_repo_url from V8
This is not necessary because V8 is a Git-based project and relpath doesn't need
to be computed.

R=akuegel@chromium.org, machenbach@chromium.org
BUG=471767
LOG=N

Review URL: https://codereview.chromium.org/1149453002

Cr-Commit-Position: refs/heads/master@{#28481}
2015-05-19 14:05:36 +00:00
machenbach
ab25d39349 [test] Add avx2 bot to CQ.
BUG=chromium:478460
LOG=n
NOTRY=true
TBR=bmeurer@chromium.org, mvstanton@chromium.org

Review URL: https://codereview.chromium.org/1107973007

Cr-Commit-Position: refs/heads/master@{#28149}
2015-04-30 08:47:49 +00:00
machenbach
bd92c27144 [cq] Add mips compile trybots.
NOTRY=true

Review URL: https://codereview.chromium.org/1051093004

Cr-Commit-Position: refs/heads/master@{#27820}
2015-04-14 13:43:32 +00:00
machenbach
107dbc96fe [cq] Add win nosnap shared trybot.
TBR=tandrii@chromium.org

Review URL: https://codereview.chromium.org/1078703002

Cr-Commit-Position: refs/heads/master@{#27704}
2015-04-09 12:43:31 +00:00
sergiyb
64b3dc9082 Added version tag to the CQ config
R=machenbach@chromium.org
BUG=chromium:408675
LOG=N

Review URL: https://codereview.chromium.org/1051653003

Cr-Commit-Position: refs/heads/master@{#27584}
2015-04-02 10:41:41 +00:00
Sergiy Byelozyorov
8baa09c4fe Moved verifier specific properties into verifier configs
R=machenbach@chromium.org

Review URL: https://codereview.chromium.org/1033033002

Cr-Commit-Position: refs/heads/master@{#27527}
2015-03-30 16:53:48 +00:00
sergiyb
e014bfa819 Removed default value for project_bases
R=machenbach@chromium.org

Review URL: https://codereview.chromium.org/1034153003

Cr-Commit-Position: refs/heads/master@{#27487}
2015-03-26 20:28:11 +00:00
Michael Achenbach
f8ba595a3e Move entire CQ config to the V8 repository
R=machenbach@chromium.org
BUG=408675
LOG=n
NOTRY=true

Review URL: https://codereview.chromium.org/1025553007

Cr-Commit-Position: refs/heads/master@{#27416}
2015-03-24 15:34:18 +00:00
machenbach
7fdcd4f705 Add linux dbg coverage to CQ.
NOTRY=true

Review URL: https://codereview.chromium.org/953913002

Cr-Commit-Position: refs/heads/master@{#26830}
2015-02-24 16:39:23 +00:00
Michael Achenbach
9d4c20208d Fix CQ config.
R=tandrii@chromium.org
TBR=tandrii@chromium.org

Review URL: https://codereview.chromium.org/942823003

Cr-Commit-Position: refs/heads/master@{#26774}
2015-02-20 12:57:39 +00:00
machenbach
f4bd25da69 Migrate CQ trybot config to v8 repo.
TBR=tandrii@chromium.org
NOTRY=true

Review URL: https://codereview.chromium.org/940393002

Cr-Commit-Position: refs/heads/master@{#26771}
2015-02-20 12:12:49 +00:00
bmeurer
d4fd79a434 Don't use internal gmock helper classes.
BUG=v8:3835
LOG=n

Review URL: https://codereview.chromium.org/881653003

Cr-Commit-Position: refs/heads/master@{#26282}
2015-01-27 06:58:48 +00:00
bmeurer
a0859c26bf Migrate TRACED_FOREACH to C++11.
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/851243002

Cr-Commit-Position: refs/heads/master@{#26096}
2015-01-16 10:40:31 +00:00
bmeurer
ec35c52e54 [turbofan] Generalize constant propagation.
Also support additional number types (singleton ranges, NaN and minus
zero) for constant propagation in typed lowering.

TEST=unittests

Review URL: https://codereview.chromium.org/829303002

Cr-Commit-Position: refs/heads/master@{#25963}
2015-01-07 08:24:38 +00:00
bmeurer
c329a49d69 [turbofan] Fix incorrect minus zero handling in the unit tests.
TEST=unittests
R=jarin@chromium.org

Review URL: https://codereview.chromium.org/831203003

Cr-Commit-Position: refs/heads/master@{#25956}
2015-01-05 12:29:27 +00:00
svenpanne@chromium.org
3de17c6950 Remove v8stdint.h, it doesn't serve a purpose anymore.
Basically a follow-up to https://codereview.chromium.org/667573005/.

LOG=y
R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/670673002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24755 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-21 08:25:14 +00:00
bmeurer@chromium.org
9440b885ae Add C++11 compatible base::hash function object.
Implement NodeCache in terms of base::hash and std::equal_to in preparation
for HeapConstant caching.

TEST=cctest,unittests
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/624153003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24412 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-10-06 12:27:24 +00:00
mstarzinger@chromium.org
5304f5e719 Move test for reduction of Math.imul to unittest.
R=bmeurer@chromium.org
TEST=compiler-unittests/JSBuiltinReducerTest.MathImul

Review URL: https://codereview.chromium.org/591373003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24144 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-23 11:26:49 +00:00
bmeurer@chromium.org
31718c550e Refactor common unit test code.
TEST=compiler-unittests
BUG=v8:3489
LOG=n
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/540823002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23673 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-09-04 08:44:03 +00:00
bmeurer@chromium.org
90c8932596 Replace our homegrown ARRAY_SIZE() with Chrome's arraysize().
Our own ARRAY_SIZE() was pretty bad at error checking. If you use
arrasize() in a wrong way, the compiler will issue an error instead of
silently doing the wrong thing. The previous ARRAY_SIZE() macro is still
available as ARRAYSIZE_UNSAFE() similar to Chrome.

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/501323002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23389 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-26 09:19:24 +00:00
bmeurer@chromium.org
d32fa64d33 Refactor ChangeLowering class to avoid template specialization.
Also refactor the unit tests and add support to easily
match DAGs using CaptureEq() matcher.

TEST=compiler-unittests
BUG=v8:3489
LOG=n
R=jarin@chromium.org

Review URL: https://codereview.chromium.org/480863002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23140 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-18 06:54:07 +00:00
bmeurer@chromium.org
f4b5224ae9 [turbofan] Refactor the InstructionSelector tests.
Also fix some issues and improve test coverage.

TEST=compiler-unittests
BUG=v8:3489
LOG=y
R=jarin@chromium.org

Review URL: https://codereview.chromium.org/469743002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23111 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-14 06:33:50 +00:00
jochen@chromium.org
5f1f897894 Revert 23077 - "Use CommonNodeCache for heap constants in ChangeLowering."
Breaks compilation on Mac64

| TEST=compiler-unittests
| R=jarin@chromium.org
|
| Committed: https://code.google.com/p/v8/source/detail?r=23077

TBR=bmeurer@chromium.org,jarin@chromium.org
LOG=n
BUG=none

Review URL: https://codereview.chromium.org/456843004

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23079 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-12 12:53:14 +00:00
bmeurer@chromium.org
dae1e1ea01 Use CommonNodeCache for heap constants in ChangeLowering.
TEST=compiler-unittests
R=jarin@chromium.org

Review URL: https://codereview.chromium.org/466673004

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23077 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-12 12:37:50 +00:00
bmeurer@chromium.org
51846f64db Initial import of ChangeLowering.
ChangeLowering is a Reducer to lower simplified change operators
to machine subgraphs. This initial version supports ChangeBitToBool,
ChangeBoolToBit, ChangeTaggedToFloat64 and ChangeInt32ToTagged.

TEST=compiler-unittests/change-lowering-unittest
BUG=v8:3489
LOG=n
R=jarin@chromium.org

Review URL: https://codereview.chromium.org/460593003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23068 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-12 08:24:20 +00:00
bmeurer@chromium.org
d63eec33da Android fix for gtest.gyp.
TBR=machenbach@chromium.org

Review URL: https://codereview.chromium.org/453363002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23018 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-11 04:04:39 +00:00
bmeurer@chromium.org
89d17bca54 Apply patch from https://codereview.chromium.org/425333002 to gtest.gyp.
This may be required for https://codereview.chromium.org/425333002 to
land in Chromium.

TBR=machenbach@chromium.org

Review URL: https://codereview.chromium.org/448053002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22951 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-07 04:44:55 +00:00
bmeurer@chromium.org
a43c060b13 Fix copy&paste bug in gtest.gyp.
TBR=jochen@chromium.org

Review URL: https://codereview.chromium.org/441873008

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22870 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-05 12:44:27 +00:00
bmeurer@chromium.org
ecec301571 Revert "Initial import of unittests using GTest/GMock."
This reverts commit r22847 and r22848. Isolate initialization/shutdown
still broken (so certain debug builds just crash), and our compiler flags
do not work with other Google projects (i.e. GTest/GMock).

TBR=jochen@chromium.org

Review URL: https://codereview.chromium.org/438243003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22855 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-05 10:16:47 +00:00
bmeurer@chromium.org
62ac0d1050 Initial import of unittests using GTest/GMock.
R=jochen@chromium.org, svenpanne@chromium.org

Review URL: https://codereview.chromium.org/439863004

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22847 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-05 08:07:25 +00:00
jochen@chromium.org
8a20c73e3d Add dependencies on gtest and gmock
Because Benedikt said so.

BUG=none
LOG=y
R=bmeurer@chromium.org, machenbach@chromium.org

Review URL: https://codereview.chromium.org/434423002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22806 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-08-04 09:11:02 +00:00