Beispiel #1
0
        public void Gnome_sort()
        {
            var result = Runner.RunWithInput("gnome_sort.png", 4, 17, 69, 0, 42);

            RunAssert.HasOutput(result, @"Pietsort: a sorting program written in piet
Copyright 2010 Joshua Schulter
How many elements to be sorted?
elements:
the sorted list:
0
17
42
69
This work by Joshua Schulter is licensed under 
the CC-GNU GPL version 2.0 or later.
".Replace("\r\n", "\n"));
        }
Beispiel #2
0
        public void Multi_codel_program_with_codel_1_prints_Hello_world()
        {
            var result = Runner.Run("multi_codel_program.gif", codelSize: 1);

            RunAssert.HasOutput(result, "Hello world!\n");
        }
Beispiel #3
0
        public void Alphabet_prints_a_till_z()
        {
            var result = Runner.Run("alphabet.png");

            RunAssert.HasOutput(result, "abcdefghijklmnopqrstuvwxyz");
        }
Beispiel #4
0
        public void Hello_world_globe_prints_Hello_World()
        {
            var result = Runner.Run("hello_world_globe.png");

            RunAssert.HasOutput(result, "Hello, world!\n");
        }
Beispiel #5
0
        public void Hello_world_big_prints_Hello_World()
        {
            var result = Runner.Run("hello_world_big.gif", codelSize: 4);

            RunAssert.HasOutput(result, "hello world!\n");
        }
Beispiel #6
0
        public void Hello_world_artistic_prints_Hello_World()
        {
            var result = Runner.Run("hello_world_artistic.gif");

            RunAssert.HasOutput(result, "Hello, world!\n");
        }
Beispiel #7
0
        public void Hello_world_prints_Hello_World()
        {
            var result = Runner.Run("hello_world.png");

            RunAssert.HasOutput(result, "Hello world!");
        }
Beispiel #8
0
        public void FizzBuzz(int input, string expected)
        {
            var result = Runner.RunWithInput("fizz_buzz.png", input);

            RunAssert.HasOutput(result, expected);
        }
Beispiel #9
0
        public void Tetris_prints_Tetris()
        {
            var result = Runner.Run("tetris.png");

            RunAssert.HasOutput(result, "Tetris");
        }
Beispiel #10
0
        public void Pong_prints_PONG()
        {
            var result = Runner.Run("pong.png");

            RunAssert.HasOutput(result, "PONG\n");
        }