#include "src/temporal/temporal-parser.h"
#include <optional>
#include "src/execution/isolate.h"
#include "src/heap/factory-inl.h"
#include "test/unittests/test-utils.h"
namespace v8 {
namespace internal {
const int32_t kUndefined = …;
void CheckCalendar(Isolate* isolate, Handle<String> iso_string,
int32_t calendar_start, int32_t calendar_length,
const std::string& expected_calendar) { … }
void CheckDate(const ParsedISO8601Result& actual, int32_t date_year,
int32_t date_month, int32_t date_day) { … }
void CheckTime(const ParsedISO8601Result& actual, int32_t time_hour,
int32_t time_minute, int32_t time_second,
int32_t time_nanosecond) { … }
void CheckTimeZoneNumericUTCOffset(const ParsedISO8601Result& actual,
int32_t tzuo_sign, int32_t tzuo_hour,
int32_t tzuo_minute, int32_t tzuo_second,
int32_t tzuo_nanosecond) { … }
void CheckDuration(const ParsedISO8601Duration& actual, int64_t sign,
int64_t years, int64_t months, int64_t weeks, int64_t days,
int64_t whole_hours, int64_t hours_fraction,
int64_t whole_minutes, int64_t minutes_fraction,
int64_t whole_seconds, int64_t seconds_fraction) { … }
char commatoperiod(char in) { … }
char asciitolower(char in) { … }
#define IMPL_VERIFY_PARSE_TEMPORAL_DATE_STRING_SUCCESS(R) …
#define IMPL_VERIFY_PARSE_TEMPORAL_DATE_TIME_STRING_SUCCESS(R) …
#define IMPL_VERIFY_PARSE_TEMPORAL_ZONED_DATE_TIME_STRING_SUCCESS(R) …
class TemporalParserTest : public TestWithIsolate { … };
#define VERIFY_PARSE_FAIL(R, str) …
#define VERIFY_PARSE_FAIL_ON_DATE(R) …
TEST_F(TemporalParserTest, TemporalTimeStringSuccess) { … }
TEST_F(TemporalParserTest, TemporalTimeStringIllegal) { … }
#define IMPL_DATE_TIME_STRING_SUCCESS(R) …
TEST_F(TemporalParserTest, TemporalDateTimeStringSuccess) { … }
TEST_F(TemporalParserTest, TemporalDateTimeStringIllegal) { … }
TEST_F(TemporalParserTest, TemporalYearMonthStringSuccess) { … }
TEST_F(TemporalParserTest, TemporalYearMonthStringIllegal) { … }
TEST_F(TemporalParserTest, TemporalMonthDayStringSuccess) { … }
TEST_F(TemporalParserTest, TemporalMonthDayStringIllegal) { … }
TEST_F(TemporalParserTest, TemporalInstantStringSuccess) { … }
TEST_F(TemporalParserTest, TemporalInstantStringIllegal) { … }
#define IMPL_ZONED_DATE_TIME_STRING_SUCCESS(R) …
TEST_F(TemporalParserTest, TemporalZonedDateTimeStringSuccess) { … }
#define VERIFY_PARSE_FAIL_ON_ZONED_DATE_TIME(R) …
TEST_F(TemporalParserTest, TemporalZonedDateTimeStringIllegal) { … }
constexpr int64_t empty = …;
TEST_F(TemporalParserTest, TemporalDurationStringBasic) { … }
TEST_F(TemporalParserTest, TemporalDurationStringNegative) { … }
TEST_F(TemporalParserTest, TemporalDurationStringPlus) { … }
TEST_F(TemporalParserTest, TemporalDurationStringMinus) { … }
TEST_F(TemporalParserTest, TemporalDurationStringLowerCase) { … }
TEST_F(TemporalParserTest, TemporalDurationStringComma) { … }
TEST_F(TemporalParserTest, TemporalDurationStringLongDigits) { … }
TEST_F(TemporalParserTest, TemporalDurationStringNotSatisfy) { … }
TEST_F(TemporalParserTest, TimeZoneNumericUTCOffsetBasic) { … }
TEST_F(TemporalParserTest, TimeZoneNumericUTCOffsetIllegal) { … }
TEST_F(TemporalParserTest, TimeZoneIdentifierSucccess) { … }
TEST_F(TemporalParserTest, TimeZoneIdentifierIllegal) { … }
TEST_F(TemporalParserTest, CalendarNameSuccess) { … }
TEST_F(TemporalParserTest, CalendarNameIllegal) { … }
}
}