Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cpdf_streamcontentparser_unittest.cpp
Go to the documentation of this file.
1
// Copyright 2016 The PDFium Authors
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#
include
"core/fpdfapi/page/cpdf_streamcontentparser.h"
6
#
include
"testing/gtest/include/gtest/gtest.h"
7
8
TEST
(
cpdf_streamcontentparser
,
PDF_FindKeyAbbreviation
) {
9
EXPECT_EQ(ByteStringView(
"BitsPerComponent"
),
10
CPDF_StreamContentParser
::
FindKeyAbbreviationForTesting
(
11
ByteStringView(
"BPC"
)));
12
EXPECT_EQ(ByteStringView(
"Width"
),
13
CPDF_StreamContentParser
::
FindKeyAbbreviationForTesting
(
14
ByteStringView(
"W"
)));
15
EXPECT_EQ(ByteStringView(
""
),
16
CPDF_StreamContentParser
::
FindKeyAbbreviationForTesting
(
17
ByteStringView(
""
)));
18
EXPECT_EQ(ByteStringView(
""
),
19
CPDF_StreamContentParser
::
FindKeyAbbreviationForTesting
(
20
ByteStringView(
"NoInList"
)));
21
// Prefix should not match.
22
EXPECT_EQ(ByteStringView(
""
),
23
CPDF_StreamContentParser
::
FindKeyAbbreviationForTesting
(
24
ByteStringView(
"WW"
)));
25
}
26
27
TEST
(
cpdf_streamcontentparser
,
PDF_FindValueAbbreviation
) {
28
EXPECT_EQ(ByteStringView(
"DeviceGray"
),
29
CPDF_StreamContentParser
::
FindValueAbbreviationForTesting
(
30
ByteStringView(
"G"
)));
31
EXPECT_EQ(ByteStringView(
"DCTDecode"
),
32
CPDF_StreamContentParser
::
FindValueAbbreviationForTesting
(
33
ByteStringView(
"DCT"
)));
34
EXPECT_EQ(ByteStringView(
""
),
35
CPDF_StreamContentParser
::
FindValueAbbreviationForTesting
(
36
ByteStringView(
""
)));
37
EXPECT_EQ(ByteStringView(
""
),
38
CPDF_StreamContentParser
::
FindValueAbbreviationForTesting
(
39
ByteStringView(
"NoInList"
)));
40
// Prefix should not match.
41
EXPECT_EQ(ByteStringView(
""
),
42
CPDF_StreamContentParser
::
FindValueAbbreviationForTesting
(
43
ByteStringView(
"II"
)));
44
}
CPDF_StreamContentParser
Definition
cpdf_streamcontentparser.h:41
CPDF_StreamContentParser::FindValueAbbreviationForTesting
static ByteStringView FindValueAbbreviationForTesting(ByteStringView abbr)
Definition
cpdf_streamcontentparser.cpp:1704
CPDF_StreamContentParser::FindKeyAbbreviationForTesting
static ByteStringView FindKeyAbbreviationForTesting(ByteStringView abbr)
Definition
cpdf_streamcontentparser.cpp:1698
TEST
TEST(FXCRYPT, MD5GenerateEmtpyData)
Definition
fx_crypt_unittest.cpp:45
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fpdfapi
page
cpdf_streamcontentparser_unittest.cpp
Generated on Thu Nov 14 2024 00:56:00 for Qt by
1.12.0