Skip to content

Commit

Permalink
Merge branch 'feature' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
CountrySideEngineer committed May 15, 2023
2 parents d7b14f5 + db1809a commit af8fbbe
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 15 deletions.
Binary file modified dev/src/bin/Release/netcoreapp3.1/gtest_gui.dll
Binary file not shown.
Binary file modified dev/src/bin/Release/netcoreapp3.1/gtest_gui.exe
Binary file not shown.
Binary file modified dev/src/bin/Release/netframework/gtest_gui.exe
Binary file not shown.
24 changes: 21 additions & 3 deletions dev/src/gtest_gui/gtest_gui/Command/TestExecuteAsyncCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,35 @@ namespace gtest_gui.Command
{
public class TestExecuteAsyncCommand : TestExecuteCommand
{
/// <summary>
/// Run test async.
/// </summary>
protected TestRunnerAsync _runnerAsync;

/// <summary>
/// Content window class.
/// </summary>
protected CountrySideEngineer.ContentWindow.ContentWindow _contentWindow;

protected CountrySideEngineer.ProgressWindow.ProgressWindow _proressWindow;
/// <summary>
/// Progress window class.
/// </summary>
protected ProgressWindow _proressWindow;

/// <summary>
/// Default constructor.
/// </summary>
public TestExecuteAsyncCommand() : base()
{
_runnerAsync = new TestRunnerAsync();
_contentWindow = new CountrySideEngineer.ContentWindow.ContentWindow();
_proressWindow = new CountrySideEngineer.ProgressWindow.ProgressWindow();
}

/// <summary>
/// Constructor with argument.
/// </summary>
/// <param name="runner"></param>
public TestExecuteAsyncCommand(TestRunner runner) : base(runner)
{
_runnerAsync = new TestRunnerAsync();
Expand All @@ -47,8 +63,7 @@ public override object ExecuteCommand(TestCommandArgument cmdArgument)
{
SetUpTestRunner(cmdArgument);

string testFileName = System.IO.Path.GetFileNameWithoutExtension(cmdArgument.TestInfo.TestFile);
_contentWindow.ViewTitle = testFileName;
_contentWindow.ViewTitle = System.IO.Path.GetFileNameWithoutExtension(cmdArgument.TestInfo.TestFile);
_contentWindow.Start();

_proressWindow.Start(_runnerAsync);
Expand Down Expand Up @@ -99,6 +114,9 @@ protected override void SetUpTestRunner(TestCommandArgument cmdArg)
_runnerAsync.TestInfo = cmdArg.TestInfo;
}

/// <summary>
/// Teardown the test.
/// </summary>
protected override void TearDownTestRunner()
{
base.TearDownTestRunner();
Expand Down
3 changes: 3 additions & 0 deletions dev/src/gtest_gui/gtest_gui/Command/TestExecuteCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ protected virtual void SetUpTestRunner(TestCommandArgument cmdArg)
}
}

/// <summary>
/// Tear down the test.
/// </summary>
protected virtual void TearDownTestRunner()
{
_runner.TestDataReceivedEventHandler -= _logBuilder.OnDataReceived;
Expand Down
10 changes: 3 additions & 7 deletions dev/src/gtest_gui/gtest_gui/Model/TestRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,11 @@ public virtual void Run(string path, TestInformation information)
/// <param name="path">Path to file.</param>
/// <param name="testItem">Test information.</param>
/// <returns>Test running process.</returns>
protected virtual Process Run(string path, TestItem testItem)
protected virtual void Run(string path, TestItem testItem)
{
ProcessStartInfo procStartInfo = GetProcessStartInfo(path, testItem);
Process process = null;

using (process = new Process())
using (var process = new Process())
{
process.StartInfo = procStartInfo;
process.StartInfo = GetProcessStartInfo(path, testItem);
process.ErrorDataReceived += OnErrorDataReceivedEvent;
process.OutputDataReceived += OnOutputDataReceivedEvent;
process.Start();
Expand All @@ -127,7 +124,6 @@ protected virtual Process Run(string path, TestItem testItem)
process.OutputDataReceived -= OnOutputDataReceivedEvent;
process.ErrorDataReceived -= OnErrorDataReceivedEvent;
}
return process;
}

/// <summary>
Expand Down
6 changes: 3 additions & 3 deletions dev/src/gtest_gui/gtest_gui/gtest_gui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<UseWPF>true</UseWPF>
<AssemblyVersion>0.9.1.0</AssemblyVersion>
<FileVersion>0.9.1.0</FileVersion>
<Version>0.9.0.0</Version>
<AssemblyVersion>0.9.2.0</AssemblyVersion>
<FileVersion>0.9.2.0</FileVersion>
<Version>0.9.2.0</Version>
<Authors>CountrySideEngineer</Authors>
<PackageLicenseExpression />
<NeutralLanguage>ja-JP</NeutralLanguage>
Expand Down
4 changes: 2 additions & 2 deletions dev/src/gtest_gui/gtest_gui_dotNet/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@
// すべての値を指定するか、次を使用してビルド番号とリビジョン番号を既定に設定できます
// 既定値にすることができます:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.9.1.0")]
[assembly: AssemblyFileVersion("0.9.1.0")]
[assembly: AssemblyVersion("0.9.2.0")]
[assembly: AssemblyFileVersion("0.9.2.0")]

0 comments on commit af8fbbe

Please sign in to comment.