1 : // Copyright 2015 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/refinery/analyzers/unloaded_module_analyzer.h"
16 :
17 : #include <stdint.h>
18 :
19 : #include <vector>
20 :
21 : #include "base/files/scoped_temp_dir.h"
22 : #include "gtest/gtest.h"
23 : #include "syzygy/minidump/minidump.h"
24 : #include "syzygy/minidump/unittest_util.h"
25 : #include "syzygy/refinery/analyzers/analyzer_util.h"
26 : #include "syzygy/refinery/process_state/process_state.h"
27 : #include "syzygy/refinery/process_state/process_state_util.h"
28 : #include "syzygy/refinery/process_state/refinery.pb.h"
29 :
30 m : namespace refinery {
31 :
32 m : TEST(UnloadedModuleAnalyzerTest, AnalyzeMinidump) {
33 m : minidump::FileMinidump minidump;
34 m : ASSERT_TRUE(minidump.Open(testing::TestMinidumps::GetNotepad32Dump()));
35 :
36 m : ProcessState process_state;
37 m : SimpleProcessAnalysis analysis(&process_state);
38 :
39 m : UnloadedModuleAnalyzer analyzer;
40 m : ASSERT_EQ(Analyzer::ANALYSIS_COMPLETE, analyzer.Analyze(minidump, analysis));
41 :
42 : // TODO(manzagop): implement testing once UnloadedModuleAnalyzer is
43 : // implemented.
44 m : }
45 :
46 m : TEST(UnloadedModuleAnalyzerTest, AnalyzeSyntheticMinidump) {
47 : // TODO(manzagop): implement testing once UnloadedModuleAnalyzer is
48 : // implemented.
49 m : }
50 :
51 m : } // namespace refinery
|