Skip to content

Commit

Permalink
Bug Fix
Browse files Browse the repository at this point in the history
* NuGet: Fixed #9: `Add-PrigAssembly -AssemblyFrom` went dead. => This is the side-effect of Issue #7. Changed the step to generate the path `tools` in the same manner as another(e.g. function `SetStubberPreBuildEventProperty`).
* NuGet: Fixed #10: `prig -p ConsoleApplication1.exe` went dead. => This is the side-effect of Issue #7. Corrected the function `Invoke-Prig`(alias: prig) to ignore the parameter `$Arguments` if it is null or empty.
* Profiler: Fixed #11: In .NET 3.5, the assembly containing dynamic methods can't be called indirectly. => This is by design of the Unmanaged Profiling API, so change the behavior to ignore them depending on whether their names aren't empty. Because I seemed that the names which come from ICorProfilerInfo::GetModuleInfo are empty when loading dynamic modules.
  • Loading branch information
urasandesu committed Jul 31, 2014
1 parent 2e7063e commit 08e4aba
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
11 changes: 9 additions & 2 deletions Nuspec/Prig.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Prig</id>
<version>0.0.0-alpha4</version>
<version>0.0.0-alpha5</version>
<title>Prig: Open Source Alternative to Microsoft Fakes</title>
<authors>Akira Sugiura</authors>
<owners>Akira Sugiura</owners>
Expand All @@ -17,7 +17,14 @@
</description>
<copyright>(c) 2014 Akira Sugiura. All rights reserved.</copyright>
<tags>tdd isolation mock mocks mocking fake fakes faking unittest unittesting</tags>
<releaseNotes>Version 0.0.0-alpha4
<releaseNotes>Version 0.0.0-alpha5
* Pre-release 5.
* Fixed Issue #9: `Add-PrigAssembly -AssemblyFrom` went dead.
* Fixed Issue #10: `prig -p ConsoleApplication1.exe` went dead.
* Fixed Issue #11: In .NET 3.5, the assembly containing dynamic methods can't be called indirectly.


Version 0.0.0-alpha4
* Pre-release 4.
* Supported the feature to generate the stub for one runtime instance.
* [NOTICE] Changed the generated stub's API. It became a static method from a nested type. For example, until previous, the stub against `System.DateTime.Now` was `System.Prig.PDateTime.NowGet.Body`. From now, the stub becomes `System.Prig.PDateTime.NowGet().Body`. Because the previous version can't propagate an instance.
Expand Down
Binary file not shown.
Binary file modified Nuspec/tools/Urasandesu.Prig/Urasandesu/Prig/NuGet.Invoke-Prig.ps1
Binary file not shown.
2 changes: 1 addition & 1 deletion Swathe
5 changes: 5 additions & 0 deletions Urasandesu.Prig/Weaver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,12 @@ namespace CWeaverDetail {
CPPANONYM_D_LOGW1(L"Current Path: %|1$s|", current_path().native());
auto modPath = path(pModProf->GetName());
auto modName = modPath.stem().native();
CPPANONYM_D_LOGW1(L"Loading Module: %|1$s|", modName);
if (modName.empty())
return S_OK;


CPPANONYM_LOG_NAMED_SCOPE("if (!modName.empty())");
auto candidateIndDllPaths = unordered_set<path, Hash<path>, EqualTo<path> >();
auto isCandidate = [&](path const &p) { return p.native().find(modName) != wstring::npos; };
for_each(m_indDllPaths | filtered(isCandidate), [&](path const &p) { candidateIndDllPaths.insert(p); });
Expand Down

0 comments on commit 08e4aba

Please sign in to comment.