Skip to content

Commit

Permalink
Update tests, add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosFigueiraMSFT committed Jan 25, 2024
1 parent 3f66519 commit 39d5144
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/tests/Microsoft.PowerFx.Core.Tests/FunctionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,22 @@ public void TestScopeArguments()
{
for (int i = 0; i < 10; i++)
{
Assert.Equal(i % 2 == 1, BuiltinFunctionsCore.AddColumns.ScopeInfo.AppliesToArgument(i));
// AddColumns(<table>, <new column>, <expression using scope from arg0>[, <new column 2>, <expression using scope from arg0>, ...]
Assert.Equal(i > 0 && i % 2 == 0, BuiltinFunctionsCore.AddColumns.ScopeInfo.AppliesToArgument(i));

// RenameColumns(<table>, <old column from arg0>, <new column>[, <old column from arg0>, <new column 2>, ...]
Assert.Equal(i % 2 == 1, BuiltinFunctionsCore.RenameColumns.ScopeInfo.AppliesToArgument(i));

// ShowColumns(<table>, <column from arg0>, <column from arg0>, ...)
Assert.Equal(i > 0, BuiltinFunctionsCore.ShowColumns.ScopeInfo.AppliesToArgument(i));

// DropColumns(<table>, <column from arg0>, <column from arg0>, ...)
Assert.Equal(i > 0, BuiltinFunctionsCore.DropColumns.ScopeInfo.AppliesToArgument(i));

// Search(<table>, <text arg>, <column from arg0>, <column from arg0>, ...)
Assert.Equal(i > 1, BuiltinFunctionsCore.Search.ScopeInfo.AppliesToArgument(i));

// ShowColumns(<table>, <column from arg0>, <sort order>, <column from arg0>, <sort order>, ...)
Assert.Equal(i % 2 == 1, BuiltinFunctionsCore.SortByColumns.ScopeInfo.AppliesToArgument(i));
}
}
Expand Down

0 comments on commit 39d5144

Please sign in to comment.