diff --git a/Tests~/MemberReorder/fixture/Fixture.cs b/Tests~/MemberReorder/fixture/Fixture.cs index cf27002..f8e39bf 100644 --- a/Tests~/MemberReorder/fixture/Fixture.cs +++ b/Tests~/MemberReorder/fixture/Fixture.cs @@ -1,3 +1,23 @@ +// Copyright 2025 Code Philosophy +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + using System; using System.Runtime.InteropServices; using UnityEngine; @@ -67,3 +87,40 @@ namespace Fx public class Plain09 { public int Prop1 {get;set;} public int Prop2 {get;set;} public int Prop3 {get;set;} public int Prop4 {get;set;} } public class Plain10 { public event Action E1; public event Action E2; public event Action E3; public event Action E4; public void Fire(){E1();E2();E3();E4();} } } + +namespace Fx2 +{ + using System.Collections; + + public class Typical : UnityEngine.MonoBehaviour + { + Func a = x => x + 1; + Func b = x => x + 2; + public IEnumerator Co() { yield return null; } + public IEnumerator Co2() { yield return null; } + } + + public class PlainHost + { + Func a = x => x + 1; + Func b = x => x + 2; + public IEnumerator Co() { yield return null; } + public IEnumerator Co2() { yield return null; } + public class NestedOne { public int v; } + public class NestedTwo { public int v; } + public enum NestedMode { Off, On, Auto } + } + + public class PlainBase { public int a; public string b; public float c; public bool d; public int e; } + + [Serializable] + public class SerChild : PlainBase { public int x; public int y; } + + public class PlainGrand { public int g1; public string g2; public float g3; public bool g4; public int g5; } + public class PlainMid : PlainGrand { public int m1; public string m2; public float m3; } + + [Serializable] + public class SerLeaf : PlainMid { public int leaf; } + + public class Holder : UnityEngine.MonoBehaviour { public SerChild data; public SerLeaf deep; } +} diff --git a/Tests~/MemberReorder/stubs.cs b/Tests~/MemberReorder/stubs.cs index bc5e17b..935c411 100644 --- a/Tests~/MemberReorder/stubs.cs +++ b/Tests~/MemberReorder/stubs.cs @@ -1,3 +1,23 @@ +// Copyright 2025 Code Philosophy +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + namespace UnityEngine.Assertions { public static class Assert { public static void IsTrue(bool c) { if(!c) throw new System.Exception("assert"); } diff --git a/Tests~/MemberReorder/unitystub/Unity.cs b/Tests~/MemberReorder/unitystub/Unity.cs index 487c40b..6178eaa 100644 --- a/Tests~/MemberReorder/unitystub/Unity.cs +++ b/Tests~/MemberReorder/unitystub/Unity.cs @@ -1,3 +1,23 @@ +// Copyright 2025 Code Philosophy +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. + namespace UnityEngine { public class Object { }