Ejemplo n.º 1
0
        public void RepeatParseFromString(RepeatAmount expAmount, int expCount, string pattern)
        {
            var repeat = RepeatInfo.FromString(pattern);

            Assert.Equal(expAmount, repeat.RepeatAmount);
            Assert.Equal(expCount, repeat.RepeatCount);
        }
Ejemplo n.º 2
0
        public void RepeatToStringMatch(RepeatAmount actAmount, int actCount, string pattern)
        {
            var repeat = new RepeatInfo {
                RepeatAmount = actAmount, RepeatCount = actCount
            };

            Assert.Equal(pattern, repeat.ToString());
        }
Ejemplo n.º 3
0
    public void BlinqShouldEqualLinqValueSequenceSelectManyResultSelector([ArrayValues] int[] sourceArr)
    {
        var sourceNativeArr = new NativeArray <int>(sourceArr, Allocator.Persistent);
        var source          = sourceNativeArr.ToValueSequence();
        var expected        = ExceptionAndValue(() => Linq.ToArray(Linq.SelectMany(source, (x) => RepeatAmount.Invoke(x), AddToIndex.Invoke)));
        var actual          = ExceptionAndValue(() => Linq.ToArray(Blinq.SelectMany(source, RepeatAmount, AddToIndex)));

        AssertAreEqual(expected, actual);
        sourceNativeArr.Dispose();
    }
Ejemplo n.º 4
0
    public void BlinqShouldEqualLinqNativeArraySelectMany([ArrayValues] int[] sourceArr)
    {
        var sourceNativeArr = new NativeArray <int>(sourceArr, Allocator.Persistent);
        var expected        = ExceptionAndValue(() => Linq.ToArray(Linq.SelectMany(sourceNativeArr, (x) => RepeatAmount.Invoke(x))));
        var actual          = ExceptionAndValue(() => Linq.ToArray(Blinq.SelectMany(sourceNativeArr, RepeatAmount)));

        AssertAreEqual(expected, actual);
        sourceNativeArr.Dispose();
    }
Ejemplo n.º 5
0
 public RepeatInfo(RepeatAmount amount, int times)
 {
     RepeatAmount = amount;
     RepeatCount  = times;
 }
Ejemplo n.º 6
0
 public RepeatInfo(RepeatAmount amount, int times)
 {
     RepeatAmount = amount;
     RepeatCount = times;
 }
Ejemplo n.º 7
0
 public void RepeatToStringMatch(RepeatAmount actAmount, int actCount, string pattern)
 {
     var repeat = new RepeatInfo {RepeatAmount = actAmount, RepeatCount = actCount};
     Assert.Equal(pattern, repeat.ToString());
 }
Ejemplo n.º 8
0
 public void RepeatParseFromString(RepeatAmount expAmount, int expCount, string pattern)
 {
     var repeat = RepeatInfo.FromString(pattern);
     Assert.Equal(expAmount, repeat.RepeatAmount);
     Assert.Equal(expCount, repeat.RepeatCount);
 }