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

Side by Side Diff: media/formats/mp4/avc_unittest.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 if (name == "EOStr") 57 if (name == "EOStr")
58 return H264NALU::kEOStream; 58 return H264NALU::kEOStream;
59 59
60 if (name == "FILL") 60 if (name == "FILL")
61 return H264NALU::kFiller; 61 return H264NALU::kFiller;
62 62
63 if (name == "R14") 63 if (name == "R14")
64 return H264NALU::kReserved14; 64 return H264NALU::kReserved14;
65 65
66 CHECK(false) << "Unexpected name: " << name; 66 // Unexpected name.
67 CHECK(false);
67 return H264NALU::kUnspecified; 68 return H264NALU::kUnspecified;
68 } 69 }
69 70
70 static std::string NALUTypeToString(int type) { 71 static std::string NALUTypeToString(int type) {
71 switch (type) { 72 switch (type) {
72 case H264NALU::kNonIDRSlice: 73 case H264NALU::kNonIDRSlice:
73 return "P"; 74 return "P";
74 case H264NALU::kSliceDataA: 75 case H264NALU::kSliceDataA:
75 return "SDA"; 76 return "SDA";
76 case H264NALU::kSliceDataB: 77 case H264NALU::kSliceDataB:
(...skipping 21 matching lines...) Expand all
98 case H264NALU::kReserved14: 99 case H264NALU::kReserved14:
99 return "R14"; 100 return "R14";
100 101
101 case H264NALU::kUnspecified: 102 case H264NALU::kUnspecified:
102 case H264NALU::kReserved15: 103 case H264NALU::kReserved15:
103 case H264NALU::kReserved16: 104 case H264NALU::kReserved16:
104 case H264NALU::kReserved17: 105 case H264NALU::kReserved17:
105 case H264NALU::kReserved18: 106 case H264NALU::kReserved18:
106 case H264NALU::kCodedSliceAux: 107 case H264NALU::kCodedSliceAux:
107 case H264NALU::kCodedSliceExtension: 108 case H264NALU::kCodedSliceExtension:
108 CHECK(false) << "Unexpected type: " << type; 109 // Unexpected type.
110 CHECK(false);
109 break; 111 break;
110 }; 112 };
111 113
112 return "UnsupportedType"; 114 return "UnsupportedType";
113 } 115 }
114 116
115 static void WriteStartCodeAndNALUType(std::vector<uint8_t>* buffer, 117 static void WriteStartCodeAndNALUType(std::vector<uint8_t>* buffer,
116 const std::string& nal_unit_type) { 118 const std::string& nal_unit_type) {
117 buffer->push_back(0x00); 119 buffer->push_back(0x00);
118 buffer->push_back(0x00); 120 buffer->push_back(0x00);
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 << "'" << test_cases[i].input << "' insert failed."; 454 << "'" << test_cases[i].input << "' insert failed.";
453 EXPECT_TRUE(AVC::IsValidAnnexB(buf, subsamples)) 455 EXPECT_TRUE(AVC::IsValidAnnexB(buf, subsamples))
454 << "'" << test_cases[i].input << "' created invalid AnnexB."; 456 << "'" << test_cases[i].input << "' created invalid AnnexB.";
455 EXPECT_EQ(test_cases[i].expected, AnnexBToString(buf, subsamples)) 457 EXPECT_EQ(test_cases[i].expected, AnnexBToString(buf, subsamples))
456 << "'" << test_cases[i].input << "' generated unexpected output."; 458 << "'" << test_cases[i].input << "' generated unexpected output.";
457 } 459 }
458 } 460 }
459 461
460 } // namespace mp4 462 } // namespace mp4
461 } // namespace media 463 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698