Commit 37654f8f authored by jameslahm's avatar jameslahm Committed by V8 LUCI CQ

[test] Move cctest/test-representation to unittests

... /objects/representation-unittest.

Bug: v8:12781
Change-Id: I3ae39df619ac6920c5ff722ed481bed20b5a5c6d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3612669
Commit-Queue: 王澳 <wangao.james@bytedance.com>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80557}
parent 3bfb0466
......@@ -240,7 +240,6 @@ v8_source_set("cctest_sources") {
"test-property-details.cc",
"test-ptr-compr-cage.cc",
"test-random-number-generator.cc",
"test-representation.cc",
"test-roots.cc",
"test-sampler-api.cc",
"test-serialize.cc",
......
......@@ -392,6 +392,7 @@ v8_source_set("unittests_sources") {
"objects/elements-kind-unittest.cc",
"objects/modules-unittest.cc",
"objects/object-unittest.cc",
"objects/representation-unittest.cc",
"objects/swiss-hash-table-helpers-unittest.cc",
"objects/value-serializer-unittest.cc",
"objects/weakarraylist-unittest.cc",
......
......@@ -25,26 +25,24 @@
// (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 "test/cctest/cctest.h"
#include "src/objects/property-details.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace v8 {
namespace internal {
using RepresentationTest = ::testing::Test;
void TestPairPositive(Representation more_general,
Representation less_general) {
Representation less_general) {
CHECK(more_general.is_more_general_than(less_general));
}
void TestPairNegative(Representation more_general,
Representation less_general) {
Representation less_general) {
CHECK(!more_general.is_more_general_than(less_general));
}
TEST(RepresentationMoreGeneralThan) {
TEST_F(RepresentationTest, RepresentationMoreGeneralThan) {
TestPairNegative(Representation::None(), Representation::None());
TestPairPositive(Representation::Smi(), Representation::None());
TestPairPositive(Representation::HeapObject(), Representation::None());
......
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