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

Unified Diff: syzygy/refinery/types/type_repository_unittest.cc

Issue 1475083002: [Refinery] Introduce TypePropagatorAnalyzer - pointer types. (Closed) Base URL: https://github.com/google/syzygy.git@master
Patch Set: Final nit Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « syzygy/refinery/types/type_repository.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: syzygy/refinery/types/type_repository_unittest.cc
diff --git a/syzygy/refinery/types/type_repository_unittest.cc b/syzygy/refinery/types/type_repository_unittest.cc
index 2dfb2534597ac2e3807e4332f61e3dd8bf4b9db1..b0d7ad254cd29e70337f4990f06ff52029127702 100644
--- a/syzygy/refinery/types/type_repository_unittest.cc
+++ b/syzygy/refinery/types/type_repository_unittest.cc
@@ -16,6 +16,7 @@
#include "base/memory/ref_counted.h"
#include "gtest/gtest.h"
+#include "syzygy/pe/pe_file.h"
#include "syzygy/refinery/types/type.h"
namespace refinery {
@@ -84,6 +85,18 @@ TEST(TypeRepositoryTest, AddTypeWithId) {
EXPECT_EQ(t2, repo->GetType(kId2));
}
+TEST(TypeRepositoryTest, GetSignature) {
+ pe::PEFile::Signature retrieved_sig;
+
+ scoped_refptr<TypeRepository> repo = new TypeRepository();
+ ASSERT_FALSE(repo->GetModuleSignature(&retrieved_sig));
+
+ pe::PEFile::Signature sig(L"Path", core::AbsoluteAddress(1U), 2, 3, 4);
+ repo = new TypeRepository(sig);
+ ASSERT_TRUE(repo->GetModuleSignature(&retrieved_sig));
+ ASSERT_EQ(sig, retrieved_sig);
+}
+
TEST(TypeRepositoryTest, Iteration) {
scoped_refptr<TypeRepository> repo = new TypeRepository();
« no previous file with comments | « syzygy/refinery/types/type_repository.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698