test: address review feedback — cover WaitForAsync predicate overload; clarify ChildrenAccessor parity row; dedup object-method exclusion
This commit is contained in:
@@ -82,6 +82,8 @@ public class RoslynScriptCompilerTests
|
||||
var matched2 = await Attributes.WaitAsync("Flag", v => v != null, System.TimeSpan.FromSeconds(5), true);
|
||||
// Root scope — WaitForAsync value overload
|
||||
var r = await Attributes.WaitForAsync("Flag", true, System.TimeSpan.FromSeconds(5));
|
||||
// Root scope — WaitForAsync predicate overload with requireGoodQuality
|
||||
var r2 = await Attributes.WaitForAsync("Flag", v => v != null, System.TimeSpan.FromSeconds(5), true);
|
||||
// Composed/child scope — value overload
|
||||
var childMatched = await Children["LeftMESReceiver"].Attributes.WaitAsync("MoveInCompleteFlag", true, System.TimeSpan.FromSeconds(5));
|
||||
""";
|
||||
|
||||
@@ -100,6 +100,11 @@ public class CompileSurfaceParityTests
|
||||
{
|
||||
new object[] { typeof(AttributeAccessor), typeof(ScriptCompileSurface.CompileAttributeAccessor) },
|
||||
new object[] { typeof(CompositionAccessor), typeof(ScriptCompileSurface.CompileCompositionAccessor) },
|
||||
// ChildrenAccessor currently exposes only an indexer (no public instance
|
||||
// methods), so this row guards nothing today. It is kept so that if a
|
||||
// callable method is ever added to ChildrenAccessor, this Theory begins
|
||||
// enforcing a mirror for it automatically — rather than silently
|
||||
// re-opening the WaitAsync-class gap.
|
||||
new object[] { typeof(ChildrenAccessor), typeof(ScriptCompileSurface.CompileChildrenAccessor) },
|
||||
};
|
||||
|
||||
@@ -138,14 +143,6 @@ public class CompileSurfaceParityTests
|
||||
{
|
||||
const BindingFlags flags = BindingFlags.Public | BindingFlags.Instance;
|
||||
|
||||
var objectMembers = new HashSet<string>(StringComparer.Ordinal)
|
||||
{
|
||||
nameof(ToString),
|
||||
nameof(GetHashCode),
|
||||
nameof(Equals),
|
||||
nameof(GetType),
|
||||
};
|
||||
|
||||
var names = new HashSet<string>(StringComparer.Ordinal);
|
||||
|
||||
foreach (var property in type.GetProperties(flags))
|
||||
@@ -157,7 +154,7 @@ public class CompileSurfaceParityTests
|
||||
// property itself is already counted by name above.
|
||||
if (method.IsSpecialName)
|
||||
continue;
|
||||
if (objectMembers.Contains(method.Name))
|
||||
if (ObjectMethodNames.Contains(method.Name))
|
||||
continue;
|
||||
names.Add(method.Name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user