Ejemplo n.º 1
0
        public void DoubleBetweenIntAndDoubleWithNegate()
        {
            var source = TestData.GetDoubleIntData();
            var result = source.Query <Tuple <double, int> >("SELECT * FROM this WHERE -item1 BETWEEN 1 AND 4.2");
            var answer = from t in source
                         where - t.Item1 >= 1 && -t.Item1 <= 4.2
                         select t;

            Assert.IsTrue(result.Any());
            Assert.IsTrue(result.SequenceEqual(answer));
        }
Ejemplo n.º 2
0
        public void CompareIntToDouble()
        {
            var source = TestData.GetDoubleIntData();
            var result = source.Query <Tuple <double, int> >("SELECT * FROM this WHERE item2 > item1");
            var answer = from t in source
                         where t.Item2 > t.Item1
                         select t;

            Assert.IsTrue(result.Any());
            Assert.IsTrue(result.SequenceEqual(answer));
        }
Ejemplo n.º 3
0
        public void DoubleBetweenDoubleAndInt()
        {
            var source = TestData.GetDoubleIntData();
            var result = source.Query <Tuple <double, int> >("SELECT * FROM this WHERE item1 BETWEEN 1.1 AND 4");
            var answer = from t in source
                         where t.Item1 >= 1.1 && t.Item1 <= 4
                         select t;

            Assert.IsTrue(result.Any());
            Assert.IsTrue(result.SequenceEqual(answer));
        }