#include <limits>
#include "src/objects/property-details.h"
#include "test/cctest/cctest.h"
namespace v8 {
namespace internal {
namespace {
std::vector<PropertyDetails> make_details() { … }
}
#ifndef DEBUG
TEST(ExceedMaxEnumerationIndex) {
int too_large_enum_index = std::numeric_limits<int>::max();
for (PropertyDetails d : make_details()) {
PropertyDetails copy(d);
d = d.set_index(too_large_enum_index);
CHECK_EQ(copy.kind(), d.kind());
CHECK_EQ(copy.location(), d.location());
CHECK_EQ(copy.attributes(), d.attributes());
CHECK_EQ(copy.cell_type(), d.cell_type());
CHECK_EQ(PropertyDetails::DictionaryStorageField::kMax,
d.dictionary_index());
}
}
#endif
TEST(AsByte) { … }
}
}