1 : // Copyright 2012 Google Inc. All Rights Reserved.
2 : //
3 : // Licensed under the Apache License, Version 2.0 (the "License");
4 : // you may not use this file except in compliance with the License.
5 : // You may obtain a copy of the License at
6 : //
7 : // http://www.apache.org/licenses/LICENSE-2.0
8 : //
9 : // Unless required by applicable law or agreed to in writing, software
10 : // distributed under the License is distributed on an "AS IS" BASIS,
11 : // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 : // See the License for the specific language governing permissions and
13 : // limitations under the License.
14 :
15 : #include "syzygy/msf/msf_reader.h"
16 :
17 : #include "base/path_service.h"
18 : #include "gtest/gtest.h"
19 : #include "syzygy/core/unittest_util.h"
20 : #include "syzygy/msf/msf_constants.h"
21 : #include "syzygy/msf/unittest_util.h"
22 :
23 : namespace msf {
24 :
25 E : TEST(MsfReaderTest, Read) {
26 : base::FilePath test_dll_msf =
27 E : testing::GetSrcRelativePath(testing::kTestPdbFilePath);
28 :
29 E : MsfReader reader;
30 E : MsfFile msf_file;
31 E : EXPECT_TRUE(reader.Read(test_dll_msf, &msf_file));
32 E : EXPECT_EQ(msf_file.StreamCount(), 168u);
33 E : }
34 :
35 : } // namespace msf
|