Esempio n. 1
0
        public void TestRepeat()
        {
            var t1 = new PyString("Foo");

            PyObject actual = t1.Repeat(3);

            Assert.AreEqual("FooFooFoo", actual.ToString());

            actual = t1.Repeat(-3);
            Assert.AreEqual("", actual.ToString());
        }
Esempio n. 2
0
        public void TestRepeat()
        {
            var t1 = new PyString("Foo");

            PyObject actual = t1.Repeat(3);

            Assert.AreEqual("FooFooFoo", actual.ToString());

            // On 32 bit system this argument should be int, but on the 64 bit system this should be long value.
            // This works on the Framework 4.0 accidentally, it should produce out of memory!
            // actual = t1.Repeat(-3);
            // Assert.AreEqual("", actual.ToString());
        }