-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
209 changed files
with
4,794 additions
and
370 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using UnityEngine; | ||
using Unity.Linq; | ||
using System.Collections; | ||
using UnityEngine.UI; | ||
using UnityEngine.EventSystems; | ||
|
||
public class uGUIScene : MonoBehaviour | ||
{ | ||
public GameObject Panel; | ||
public GameObject CloneFrom; | ||
public Button Button; | ||
public int HogeHoge; | ||
|
||
public void OnEnable() | ||
{ | ||
var clone = GameObject.Instantiate(CloneFrom); | ||
Panel.MoveToLast(clone); | ||
} | ||
|
||
|
||
|
||
|
||
// Use this for initialization | ||
void Start() | ||
{ | ||
|
||
Button.onClick.AddListener(() => | ||
{ | ||
var clone = GameObject.Instantiate(CloneFrom); | ||
|
||
Panel.MoveToLast(clone); | ||
}); | ||
|
||
} | ||
|
||
// Update is called once per frame | ||
void Update() | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 104 additions & 0 deletions
104
Assets/UnityTestTools/Common/Editor/TestFilterSettings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using UnityEditor; | ||
using System.Linq; | ||
|
||
namespace UnityTest | ||
{ | ||
public class TestFilterSettings | ||
{ | ||
public bool ShowSucceeded; | ||
public bool ShowFailed; | ||
public bool ShowIgnored; | ||
public bool ShowNotRun; | ||
|
||
public string FilterByName; | ||
public int FilterByCategory; | ||
|
||
private GUIContent _succeededBtn; | ||
private GUIContent _failedBtn; | ||
private GUIContent _ignoredBtn; | ||
private GUIContent _notRunBtn; | ||
|
||
public string[] AvailableCategories; | ||
|
||
private readonly string _prefsKey; | ||
|
||
public TestFilterSettings(string prefsKey) | ||
{ | ||
_prefsKey = prefsKey; | ||
Load(); | ||
UpdateCounters(Enumerable.Empty<ITestResult>()); | ||
} | ||
|
||
public void Load() | ||
{ | ||
ShowSucceeded = EditorPrefs.GetBool(_prefsKey + ".ShowSucceeded", true); | ||
ShowFailed = EditorPrefs.GetBool(_prefsKey + ".ShowFailed", true); | ||
ShowIgnored = EditorPrefs.GetBool(_prefsKey + ".ShowIgnored", true); | ||
ShowNotRun = EditorPrefs.GetBool(_prefsKey + ".ShowNotRun", true); | ||
FilterByName = EditorPrefs.GetString(_prefsKey + ".FilterByName", string.Empty); | ||
FilterByCategory = EditorPrefs.GetInt(_prefsKey + ".FilterByCategory", 0); | ||
} | ||
|
||
public void Save() | ||
{ | ||
EditorPrefs.SetBool(_prefsKey + ".ShowSucceeded", ShowSucceeded); | ||
EditorPrefs.SetBool(_prefsKey + ".ShowFailed", ShowFailed); | ||
EditorPrefs.SetBool(_prefsKey + ".ShowIgnored", ShowIgnored); | ||
EditorPrefs.SetBool(_prefsKey + ".ShowNotRun", ShowNotRun); | ||
EditorPrefs.SetString(_prefsKey + ".FilterByName", FilterByName); | ||
EditorPrefs.SetInt(_prefsKey + ".FilterByCategory", FilterByCategory); | ||
} | ||
|
||
public void UpdateCounters(IEnumerable<ITestResult> results) | ||
{ | ||
var summary = new ResultSummarizer(results); | ||
|
||
_succeededBtn = new GUIContent(summary.Passed.ToString(), Icons.SuccessImg, "Show tests that succeeded"); | ||
_failedBtn = new GUIContent((summary.Errors + summary.Failures + summary.Inconclusive).ToString(), Icons.FailImg, "Show tests that failed"); | ||
_ignoredBtn = new GUIContent((summary.Ignored + summary.NotRunnable).ToString(), Icons.IgnoreImg, "Show tests that are ignored"); | ||
_notRunBtn = new GUIContent((summary.TestsNotRun - summary.Ignored - summary.NotRunnable).ToString(), Icons.UnknownImg, "Show tests that didn't run"); | ||
} | ||
|
||
public string[] GetSelectedCategories() | ||
{ | ||
if(AvailableCategories == null) return new string[0]; | ||
|
||
return AvailableCategories.Where ((c, i) => (FilterByCategory & (1 << i)) != 0).ToArray(); | ||
} | ||
|
||
public void OnGUI() | ||
{ | ||
EditorGUI.BeginChangeCheck(); | ||
|
||
FilterByName = GUILayout.TextField(FilterByName, "ToolbarSeachTextField", GUILayout.MinWidth(100), GUILayout.MaxWidth(250), GUILayout.ExpandWidth(true)); | ||
if(GUILayout.Button (GUIContent.none, string.IsNullOrEmpty(FilterByName) ? "ToolbarSeachCancelButtonEmpty" : "ToolbarSeachCancelButton")) | ||
FilterByName = string.Empty; | ||
|
||
if (AvailableCategories != null && AvailableCategories.Length > 0) | ||
FilterByCategory = EditorGUILayout.MaskField(FilterByCategory, AvailableCategories, EditorStyles.toolbarDropDown, GUILayout.MaxWidth(90)); | ||
|
||
ShowSucceeded = GUILayout.Toggle(ShowSucceeded, _succeededBtn, EditorStyles.toolbarButton); | ||
ShowFailed = GUILayout.Toggle(ShowFailed, _failedBtn, EditorStyles.toolbarButton); | ||
ShowIgnored = GUILayout.Toggle(ShowIgnored, _ignoredBtn, EditorStyles.toolbarButton); | ||
ShowNotRun = GUILayout.Toggle(ShowNotRun, _notRunBtn, EditorStyles.toolbarButton); | ||
|
||
if(EditorGUI.EndChangeCheck()) Save (); | ||
} | ||
|
||
public RenderingOptions BuildRenderingOptions() | ||
{ | ||
var options = new RenderingOptions(); | ||
options.showSucceeded = ShowSucceeded; | ||
options.showFailed = ShowFailed; | ||
options.showIgnored = ShowIgnored; | ||
options.showNotRunned = ShowNotRun; | ||
options.nameFilter = FilterByName; | ||
options.categories = GetSelectedCategories(); | ||
return options; | ||
} | ||
} | ||
|
||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-1.62 KB
Assets/UnityTestTools/Common/Editor/icons/play_selected-darktheme.png
Binary file not shown.
Binary file removed
BIN
-1.61 KB
Assets/UnityTestTools/Common/Editor/icons/play_selected-lighttheme.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+24.9 KB
Assets/UnityTestTools/Examples/AssertionExample/AssertionsExample.unity
Binary file not shown.
Binary file renamed
BIN
+4.12 KB
...on/Settings/UnitTestsRunnerSettings.asset → ...ples/AssertionExample/Ball.physicMaterial
Binary file not shown.
Binary file added
BIN
+4.08 KB
Assets/UnityTestTools/Examples/AssertionExample/BouncingPlane.physicMaterial
Binary file not shown.
Binary file added
BIN
+8.82 KB
Assets/UnityTestTools/Examples/AssertionExample/BouncingSphere.prefab
Binary file not shown.
Binary file added
BIN
+4.34 KB
Assets/UnityTestTools/Examples/AssertionExample/Materials/checkerTexture.mat
Binary file not shown.
Binary file added
BIN
+4.08 KB
Assets/UnityTestTools/Examples/AssertionExample/NotBouncingPlane.physicMaterial
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+153 KB
...s/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Animations/ShootAdditive.anim
Binary file not shown.
Binary file added
BIN
+164 KB
...yTestTools/Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/ExampleABTests.unity
Binary file not shown.
Binary file added
BIN
+3.41 KB
...ples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/Blob_Storm.mat
Binary file not shown.
Binary file added
BIN
+3.41 KB
...Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/BloodA.mat
Binary file not shown.
Binary file added
BIN
+3.43 KB
...tegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/ElectricShockwave.mat
Binary file not shown.
Binary file added
BIN
+3.42 KB
...rationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/EleeectricSparksHitA.mat
Binary file not shown.
Binary file added
BIN
+3.43 KB
...s/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/FireBall_Blue.mat
Binary file not shown.
Binary file added
BIN
+3.43 KB
...mples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/FireballA.mat
Binary file not shown.
Binary file added
BIN
+3.41 KB
...ntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/ShockWave_Simple.mat
Binary file not shown.
Binary file added
BIN
+3.65 KB
...Examples/IntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/SmokeA.mat
Binary file not shown.
Binary file added
BIN
+3.42 KB
...ntegrationTestsFrameworkExamples/AngryBotsTests/Explosions/Materials/scorchMarkSpider.mat
Binary file not shown.
Oops, something went wrong.