浏览代码

more testing

Charlie Kindel 5 年之前
父节点
当前提交
af88f610b0
共有 1 个文件被更改,包括 14 次插入0 次删除
  1. 14 0
      UICatalog/UICatalog.cs

+ 14 - 0
UICatalog/UICatalog.cs

@@ -85,8 +85,22 @@ namespace UICatalog {
 				scenario.Init (Application.Top, _baseColorScheme);
 				scenario.Setup ();
 				scenario.Run ();
+
+#if DEBUG
+				foreach (var inst in Responder.Instances) {
+					Debug.Assert (inst.WasDisposed);
+				}
+				Responder.Instances.Clear();
+#endif
+
 				scenario = GetScenarioToRun ();
 			}
+
+#if DEBUG
+			foreach (var inst in Responder.Instances) {
+				Debug.Assert (inst.WasDisposed);
+			}
+#endif
 		}
 
 		/// <summary>