summaryrefslogtreecommitdiff
path: root/Runtime/Graphs/UnityEngine.Graphs/TestHelpers.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Runtime/Graphs/UnityEngine.Graphs/TestHelpers.cs')
-rw-r--r--Runtime/Graphs/UnityEngine.Graphs/TestHelpers.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/Runtime/Graphs/UnityEngine.Graphs/TestHelpers.cs b/Runtime/Graphs/UnityEngine.Graphs/TestHelpers.cs
new file mode 100644
index 0000000..feb438b
--- /dev/null
+++ b/Runtime/Graphs/UnityEngine.Graphs/TestHelpers.cs
@@ -0,0 +1,33 @@
+#if TESTING
+
+using UnityEngine;
+
+namespace UnityEngine.Graphs
+{
+ public class Testing
+ {
+ public class Object
+ {
+ public string name;
+ }
+
+ public class ObjectSub1 : Object { }
+ public class ObjectSub2 : Object { }
+
+ // fake animation curve. can't seem to be able to initialize real one out of Unity
+ public class AnimationCurve
+ {
+ public WrapMode postWrapMode;
+ public WrapMode preWrapMode;
+ public Keyframe[] keys;
+ public AnimationCurve(params Keyframe[] frames) { keys = frames; }
+ }
+
+ public static bool AmIRunningInMono()
+ {
+ // internet says this is a supported way of detecting mono runtime
+ return System.Type.GetType ("Mono.Runtime") != null;
+ }
+ }
+}
+#endif