Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Side by Side Diff: third_party/WebKit/Source/platform/text/DateTimeFormatTest.cpp

Issue 2811453002: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/text (Closed)
Patch Set: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in platform/text Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 24 matching lines...) Expand all
35 public: 35 public:
36 using FieldType = DateTimeFormat::FieldType; 36 using FieldType = DateTimeFormat::FieldType;
37 37
38 struct Token { 38 struct Token {
39 String string; 39 String string;
40 int count; 40 int count;
41 FieldType fieldType; 41 FieldType fieldType;
42 42
43 Token(FieldType fieldType, int count = 1) 43 Token(FieldType fieldType, int count = 1)
44 : count(count), fieldType(fieldType) { 44 : count(count), fieldType(fieldType) {
45 ASSERT(fieldType != DateTimeFormat::FieldTypeLiteral); 45 DCHECK_NE(fieldType, DateTimeFormat::FieldTypeLiteral);
46 } 46 }
47 47
48 Token(const String& string) 48 Token(const String& string)
49 : string(string), 49 : string(string),
50 count(0), 50 count(0),
51 fieldType(DateTimeFormat::FieldTypeLiteral) {} 51 fieldType(DateTimeFormat::FieldTypeLiteral) {}
52 52
53 bool operator==(const Token& other) const { 53 bool operator==(const Token& other) const {
54 return fieldType == other.fieldType && count == other.count && 54 return fieldType == other.fieldType && count == other.count &&
55 string == other.string; 55 string == other.string;
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('O')); 295 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('O'));
296 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('P')); 296 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('P'));
297 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('R')); 297 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('R'));
298 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('T')); 298 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('T'));
299 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('U')); 299 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('U'));
300 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('V')); 300 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('V'));
301 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('X')); 301 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('X'));
302 } 302 }
303 303
304 } // namespace blink 304 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698