public static IList<FilterTestMultiStmtExecution> Executions(bool withStats) { IList<FilterTestMultiStmtPermutable> cases = new List<FilterTestMultiStmtPermutable>(); var stats = FilterTestMultiStmtAssertStats.MakeTwoSameStat( "P0=(fh:1, fi:2),P1=(fh:2, fi:3),P2=(fh:1, fi:2),P3=(fh:0, fi:0, fipar:0)"); // same equals-indexes FilterTestMultiStmtPermutable.AddCase( cases, stats, "TheString != 'x' and TheString != 'y' and DoubleBoxed is not null", "TheString != 'x' and TheString != 'y' and LongBoxed is not null", FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBeanWBoxed("E1", -1, null, null), false, false), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBeanWBoxed("x", -1, 1d, 1L), false, false), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBeanWBoxed("x", -1, 1d, null), false, false), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBeanWBoxed("y", -1, 1d, 1L), false, false), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBeanWBoxed("E2", -1, 1d, 1L), true, true), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBeanWBoxed("E3", -1, 1d, null), true, false), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBeanWBoxed("E4", -1, null, 1L), false, true)); // we permute only [0, 1] as all filters are the same return FilterTestMultiStmtRunner.ComputePermutations( typeof(ExprFilterPlanTwoFilterNestedTwoDiff), new PermutationSpec(0, 1), cases, withStats); }
public static IList<FilterTestMultiStmtExecution> Executions(bool withStats) { IList<FilterTestMultiStmtPermutable> cases = new List<FilterTestMultiStmtPermutable>(); var stats = FilterTestMultiStmtAssertStats.MakeSingleStat("P0=(fh:1,fi:1),P1=(fh:0,fi:0,fipar:0)"); // simple equals AddCase( cases, stats, "IntPrimitive = 0", MakeItem(MakeBean("E1", 0), true), MakeItem(MakeBean("E2", 1), false)); // simple "not-equals" AddCase(cases, stats, "TheString != 'A'", MakeItem(MakeBean("B"), true), MakeItem(MakeBean("A"), false)); // simple greater AddCase( cases, stats, "IntPrimitive >= 0", MakeItem(MakeBean("E1", 0), true), MakeItem(MakeBean("E1", 1), true), MakeItem(MakeBean("E2", -1), false)); // simple "is" AddCase(cases, stats, "TheString is null", MakeItem(MakeBean(null), true), MakeItem(MakeBean("A"), false)); // simple "is-not" AddCase( cases, stats, "TheString is not null", MakeItem(MakeBean(null), false), MakeItem(MakeBean("A"), true)); // simple boolean expression AddCase(cases, stats, "TheString like 'A%'", MakeItem(MakeBean("A"), true), MakeItem(MakeBean("B"), false)); AddCase( cases, stats, "getLocalValue(TheString) = 'A'", MakeItem(MakeBean("A"), true), MakeItem(MakeBean("B"), false)); // nullable-endpoint range handled as boolean AddCase( cases, stats, "TheString between null and 'Z'", MakeItem(MakeBean("A"), false), MakeItem(MakeBean("B"), false)); return FilterTestMultiStmtRunner.ComputePermutations( typeof(ExprFilterPlanOneFilterNonNested), new PermutationSpec(true), cases, withStats); }
public static IList<FilterTestMultiStmtExecution> Executions(bool withStats) { IList<FilterTestMultiStmtPermutable> cases = new List<FilterTestMultiStmtPermutable>(); var stats = FilterTestMultiStmtAssertStats.MakeSingleStat("P0=(fh:1, fi:4),P1=(fh:0, fi:0, fipar:0)"); // simple four-param equals FilterTestMultiStmtPermutable.AddCase( cases, stats, "IntPrimitive=1, LongPrimitive=10, DoublePrimitive=100, BoolPrimitive=true", FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("A", 1, 10, 100, true), true), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("A", 1, 10, 100, false), false), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("A", 0, 10, 100, true), false)); // add boolean-expr FilterTestMultiStmtPermutable.AddCase( cases, stats, "IntPrimitive=1, LongPrimitive=10, DoublePrimitive=100, TheString like 'A%'", FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("A", 1, 10, 100), true), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("B", 1, 10, 100), false), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("A", 1, 10, 0), false)); return FilterTestMultiStmtRunner.ComputePermutations( typeof(ExprFilterPlanOneFilterNestedFourLvl), new PermutationSpec(true), cases, withStats); }
public static IList<FilterTestMultiStmtExecution> Executions(bool withStats) { IList<FilterTestMultiStmtPermutable> cases = new List<FilterTestMultiStmtPermutable>(); var stats = FilterTestMultiStmtAssertStats.MakeTwoSameStat( "P0=(fh:1, fi:1),P1=(fh:2, fi:1),P2=(fh:1, fi:1),P3=(fh:0, fi:0, fipar:0)"); // same equals-index, same value AddCase( cases, stats, "IntPrimitive = 0", "IntPrimitive = 0", MakeItem(MakeBean("E1", 0), true, true), MakeItem(MakeBean("E2", 1), false, false)); // boolean-index AddCase( cases, stats, "TheString like 'A%'", "TheString like 'A%'", MakeItem(MakeBean("A1"), true, true), MakeItem(MakeBean("B1"), false, false)); return FilterTestMultiStmtRunner.ComputePermutations( typeof(ExprFilterPlanTwoFilterSame), new PermutationSpec(0, 1), cases, withStats); }
public static IList<FilterTestMultiStmtExecution> Executions(bool withStats) { IList<FilterTestMultiStmtPermutable> cases = new List<FilterTestMultiStmtPermutable>(); var stats = FilterTestMultiStmtAssertStats.MakeSingleStat("P0=(fh:1,fi:2),P1=(fh:0,fi:0,fipar:0)"); AddCase( cases, stats, "IntPrimitive = 0 or LongPrimitive = 0", MakeItem(MakeBean("E1", 0, 1), true), MakeItem(MakeBean("E2", 1, 0), true), MakeItem(MakeBean("E3", 1, 1), false)); return FilterTestMultiStmtRunner.ComputePermutations( typeof(ExprFilterPlanOneFilterTwoPathNonNested), new PermutationSpec(true), cases, withStats); }
public static IList<FilterTestMultiStmtExecution> Executions(bool withStats) { IList<FilterTestMultiStmtPermutable> cases = new List<FilterTestMultiStmtPermutable>(); var stats = FilterTestMultiStmtAssertStats.MakeSingleStat("P0=(fh:1,fi:3),P1=(fh:0,fi:0,fipar:0)"); FilterTestMultiStmtPermutable.AddCase( cases, stats, "TheString = 'A' and (IntPrimitive = 0 or LongPrimitive = 0)", FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("A", 0, 1), true), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("A", 1, 0), true), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("A", 1, 1), false), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("B", 0, 0), false)); return FilterTestMultiStmtRunner.ComputePermutations( typeof(ExprFilterPlanOneFilterTwoPathNested), new PermutationSpec(true), cases, withStats); }
public static IList<FilterTestMultiStmtExecution> Executions(bool withStats) { IList<FilterTestMultiStmtPermutable> cases = new List<FilterTestMultiStmtPermutable>(); var stats = FilterTestMultiStmtAssertStats.MakeTwoSameStat( "P0=(fh:1, fi:1),P1=(fh:2, fi:1),P2=(fh:1, fi:1),P3=(fh:0, fi:0, fipar:0)"); // same equals-index, different value FilterTestMultiStmtPermutable.AddCase( cases, stats, "IntPrimitive = 0", "IntPrimitive = 1", FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E1", 0), true, false), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E2", 1), false, true), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E3", -1), false, false)); return FilterTestMultiStmtRunner.ComputePermutations( typeof(ExprFilterPlanTwoFilterDifferent), new PermutationSpec(true), cases, withStats); }
public static IList<FilterTestMultiStmtExecution> Executions(bool withStats) { IList<FilterTestMultiStmtPermutable> cases = new List<FilterTestMultiStmtPermutable>(); var stats = FilterTestMultiStmtAssertStats.MakeTwoSameStat( "P0=(fh:1, fi:3),P1=(fh:2, fi:3),P2=(fh:1, fi:3),P3=(fh:0, fi:0, fipar:0)"); AddCase( cases, stats, "TheString = 'A' and (IntPrimitive = 0 or LongPrimitive = 0)", "TheString = 'A' and (IntPrimitive = 0 or LongPrimitive = 0)", MakeItem(MakeBean("A", 0, 1), true, true), MakeItem(MakeBean("A", 1, 0), true, true), MakeItem(MakeBean("A", 1, 1), false, false), MakeItem(MakeBean("B", 0, 0), false, false)); // we permute only [0, 1] as all filters are the same return FilterTestMultiStmtRunner.ComputePermutations( typeof(ExprFilterPlanTwoFilterTwoPathNestedSame), new PermutationSpec(0, 1), cases, withStats); }
public static IList<FilterTestMultiStmtExecution> Executions(bool withStats) { IList<FilterTestMultiStmtPermutable> cases = new List<FilterTestMultiStmtPermutable>(); var stats = FilterTestMultiStmtAssertStats.MakeTwoSameStat( "P0=(fh:1, fi:2),P1=(fh:2, fi:2),P2=(fh:1, fi:2),P3=(fh:0, fi:0, fipar:0)"); // same equals-indexes AddCase( cases, stats, "IntPrimitive = 0 and LongPrimitive = 0", "IntPrimitive = 0 and LongPrimitive = 0", MakeItem(MakeBean("E1", 0, 0), true, true), MakeItem(MakeBean("E2", 1, 0), false, false), MakeItem(MakeBean("E3", 0, 1), false, false)); // same not-equals-index AddCase( cases, stats, "IntPrimitive != 1 and LongPrimitive != 2", "IntPrimitive != 1 and LongPrimitive != 2", MakeItem(MakeBean("E1", 1, 2), false, false), MakeItem(MakeBean("E2", 2, 3), true, true), MakeItem(MakeBean("E3", 1, -1), false, false), MakeItem(MakeBean("E4", -1, 2), false, false)); // same greater-indexes AddCase( cases, stats, "IntPrimitive > 0 and LongPrimitive > 0", "IntPrimitive > 0 and LongPrimitive > 0", MakeItem(MakeBean("E1", 1, 1), true, true), MakeItem(MakeBean("E2", 1, 0), false, false), MakeItem(MakeBean("E3", 0, 1), false, false)); // same range-index AddCase( cases, stats, "IntPrimitive between 0 and 10 and LongPrimitive between 0 and 10", "IntPrimitive between 0 and 10 and LongPrimitive between 0 and 10", MakeItem(MakeBean("E1", 1, 1), true, true), MakeItem(MakeBean("E2", 1, -1), false, false), MakeItem(MakeBean("E3", -1, 1), false, false)); // same in-index AddCase( cases, stats, "IntPrimitive in (1, 2) and LongPrimitive in (2, 3)", "IntPrimitive in (1, 2) and LongPrimitive in (2, 3)", MakeItem(MakeBean("E1", 1, 2), true, true), MakeItem(MakeBean("E2", 2, 3), true, true), MakeItem(MakeBean("E3", 1, -1), false, false), MakeItem(MakeBean("E4", -1, 1), false, false)); // same not-in-index AddCase( cases, stats, "IntPrimitive not in (1, 2) and LongPrimitive not in (2, 3)", "IntPrimitive not in (1, 2) and LongPrimitive not in (2, 3)", MakeItem(MakeBean("E1", 1, 2), false, false), MakeItem(MakeBean("E2", 2, 3), false, false), MakeItem(MakeBean("E3", -1, -1), true, true), MakeItem(MakeBean("E4", -1, 2), false, false)); // we permute only [0, 1] as all filters are the same return FilterTestMultiStmtRunner.ComputePermutations( typeof(ExprFilterPlanTwoFilterNestedTwoSame), new PermutationSpec(0, 1), cases, withStats); }
public static IList<FilterTestMultiStmtExecution> Executions(bool withStats) { IList<FilterTestMultiStmtPermutable> cases = new List<FilterTestMultiStmtPermutable>(); var stats = FilterTestMultiStmtAssertStats.MakeSingleStat("P0=(fh:1, fi:2),P1=(fh:0, fi:0, fipar:0)"); // simple two-param equals and not-equals FilterTestMultiStmtPermutable.AddCase( cases, stats, "IntPrimitive=1, LongPrimitive=10", FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("A", 1, 10), true), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("A", 1, 0), false), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("A", 0, 10), false)); FilterTestMultiStmtPermutable.AddCase( cases, stats, "IntPrimitive != 0, LongPrimitive != 1", FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E1", 0, 1), false), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E2", -1, -1), true), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E3", 0, -1), false), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E4", -1, 1), false)); // simple two-param greater FilterTestMultiStmtPermutable.AddCase( cases, stats, "IntPrimitive>1, LongPrimitive>10", FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("A", 1, 10), false), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("A", 2, 11), true), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("A", 2, 10), false)); // two-param range FilterTestMultiStmtPermutable.AddCase( cases, stats, "IntPrimitive between 0 and 2, LongPrimitive between 0 and 2", FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E1", 0, 1), true), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E2", 0, 2), true), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E3", 2, 0), true), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E10", 5, 1), false), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E11", 1, 5), false), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E12", -1, -1), false)); // two-param 'in' FilterTestMultiStmtPermutable.AddCase( cases, stats, "IntPrimitive in (0,1), LongPrimitive in (2, 3)", FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E1", 0, 2), true), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E2", 1, 3), true), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E3", 0, 3), true), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E10", 2, 2), false), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E11", 1, 4), false), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E12", -1, -1), false)); // two-param 'not-in' FilterTestMultiStmtPermutable.AddCase( cases, stats, "IntPrimitive not in (0,1), LongPrimitive not in (2, 3)", FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E1", 2, 0), true), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E2", -1, -1), true), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E3", 3, 1), true), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E10", 0, 2), false), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E11", 1, 4), false), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("E12", -1, 2), false)); // equals with boolean FilterTestMultiStmtPermutable.AddCase( cases, stats, "IntPrimitive=1 and TheString like 'A%B'", FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("A B", 1), true), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("A", 1), false), FilterTestMultiStmtAssertItem.MakeItem(SupportBean.MakeBean("A B", 0), false)); return FilterTestMultiStmtRunner.ComputePermutations( typeof(ExprFilterPlanOneFilterNestedTwoLvl), new PermutationSpec(true), cases, withStats); }