Fixed unit tests

This commit is contained in:
niksedk 2014-06-15 20:55:25 +02:00
parent ef6ed45dca
commit 7c18f48baa
6 changed files with 16 additions and 4 deletions

View File

@ -84,7 +84,7 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>AnyCPU</PlatformTarget>
<CodeAnalysisLogFile>bin\Release\SubtitleEdit.exe.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>

View File

@ -71,6 +71,15 @@ namespace Test
CopyStream(strm, file);
}
}
strm = asm.GetManifestResourceStream("Test.Hunspellx64.dll");
if (strm != null)
{
var rdr = new StreamReader(strm);
using (Stream file = File.OpenWrite("Hunspellx64.dll"))
{
CopyStream(strm, file);
}
}
}
//Use ClassCleanup to run code after all tests in a class have run

BIN
src/Test/Hunspellx64.dll Normal file

Binary file not shown.

View File

@ -46,7 +46,7 @@
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup>
@ -87,7 +87,9 @@
<ItemGroup>
<EmbeddedResource Include="Hunspellx86.dll" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<EmbeddedResource Include="Hunspellx64.dll" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>

View File

@ -41,6 +41,7 @@ namespace UpdateAssemblyInfo
static int Main(string[] args)
{
string errorFileName = System.Reflection.Assembly.GetEntryAssembly().Location.Replace(".exe", "_error.txt");
File.WriteAllText(errorFileName, "test");
if (args.Length != 2)
{

View File

@ -28,7 +28,7 @@
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>