Esempio n. 1
0
        public void Any5()
        {
            var list = FList.Empty <int>();
            var any  = FList.Any(i => i > 3, list);

            Assert.IsFalse(any);
        }
Esempio n. 2
0
        public void All5()
        {
            var list = FList.Empty <int>();
            var all  = FList.All(i => i > 3, list);

            Assert.IsFalse(all);
        }
Esempio n. 3
0
        public void FListEmptyEqualsFListTypedEmpty()
        {
            var empty1 = FList.Empty <int>();
            var empty2 = FList <int> .Empty;

            Assert.That.Value(empty1).IsReferenceEquals(empty2);
        }
Esempio n. 4
0
        public void RemoveAll7()
        {
            var list     = FList.New(3, 3, 3);
            var actual   = FList.RemoveAll(3, list);
            var expected = FList.Empty <int>();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 5
0
        public void Append3()
        {
            var list     = FList.Empty <int>();
            var actual   = FList.Append(list, FList.New(4));
            var expected = FList.New(4);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveFirst5()
        {
            var list     = FList.Empty <int>();
            var actual   = FList.RemoveFirst(4, list);
            var expected = FList.Empty <int>();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 7
0
        public void Drop6()
        {
            var list     = FList.Empty <int>();
            var actual   = FList.Drop(1, list);
            var expected = FList.Empty <int>();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 8
0
        public void Map3()
        {
            var list     = FList.Empty <int>();
            var actual   = FList.Map(i => i * i, list);
            var expected = FList.Empty <int>();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 9
0
        public void Filter2()
        {
            var list     = FList.New(1, 2, 3);
            var actual   = FList.Filter(i => i > 3, list);
            var expected = FList.Empty <int>();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 10
0
        public void SortBy5()
        {
            var list     = FList.Empty <int>();
            var actual   = FList.SortBy((x, y) => x < y, list);
            var expected = FList.Empty <int>();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 11
0
        public void Tail3()
        {
            var list     = FList.New(5);
            var actual   = FList.Tail(list);
            var expected = FList.Empty <int>();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 12
0
        public void Take4()
        {
            var list     = FList.New(1, 2, 3, 4, 5);
            var actual   = FList.Take(0, list);
            var expected = FList.Empty <int>();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 13
0
        public void Length3()
        {
            var list     = FList.Empty <int>();
            var actual   = FList.Length(list);
            var expected = 0;

            Assert.AreEqual(expected, actual);
        }
Esempio n. 14
0
        public void Prepend3()
        {
            var list     = FList.Empty <int>();
            var actual   = FList.Prepend(4, list);
            var expected = FList.New(4);

            Assert.AreEqual(expected, actual);
        }
Esempio n. 15
0
        public void Elem6()
        {
            var list     = FList.Empty <int>();
            var actual   = FList.Elem(6, list);
            var expected = false;

            Assert.AreEqual(expected, actual);
        }
Esempio n. 16
0
        public void Sort5()
        {
            var list     = FList.Empty <int>();
            var actual   = FList.Sort(list);
            var expected = FList.Empty <int>();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 17
0
        public void Reverse4()
        {
            var list     = FList.Empty <int>();
            var actual   = FList.Reverse(list);
            var expected = FList.Empty <int>();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 18
0
        public void Drop5()
        {
            var list     = FList.New(1, 2, 3, 4, 5);
            var actual   = FList.Drop(6, list);
            var expected = FList.Empty <int>();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 19
0
        public void Init2()
        {
            var list     = FList.New(1);
            var actual   = FList.Init(list);
            var expected = FList.Empty <int>();

            Assert.AreEqual(expected, actual);
        }
Esempio n. 20
0
        public void Filter2String()
        {
            var list     = "123";
            var actual   = FList.Filter(i => i > '3', list);
            var expected = FList.Empty <char>();

            Assert.AreEqual(expected, actual);
        }
 public void ErrorCase()
 {
     try
     {
         var a = Collisions.CollisionFuntions.PartialFeynmanDiagram(FList.Empty <string>());
     }
     catch (Exception)
     {
         Assert.AreEqual(1, 1);
     }
 }
Esempio n. 22
0
 //Pure
 public static Atom AtomCreator(int AtomicNumber, int MassNumber)
 {
     return(AtomicNumber >= 1 && AtomicNumber <= 118 ? new Atom(CreateProtonList(AtomicNumber, FList.Empty <Proton>()), CreateNeutronList((MassNumber - AtomicNumber), FList.Empty <Neutron>())) : null);
 }
Esempio n. 23
0
 public void Head3Action()
 {
     var list   = FList.Empty <int>();
     var actual = FList.Head(list);
 }
Esempio n. 24
0
        public void Empty()
        {
            var list = FList.Empty <int>();

            Assert.IsTrue(FList.IsEmpty(list));
        }
Esempio n. 25
0
 public void Tail4()
 {
     var list   = FList.Empty <int>();
     var actual = FList.Tail(list);
 }