Sha256: 26f10019c3e3844420f16c1eca1f692cdc752820b48006b8ebea481213e4ff76

Contents?: true

Size: 1.24 KB

Versions: 154

Compression:

Stored size: 1.24 KB

Contents

CREATE OR REPLACE PACKAGE ut_hello_world#
IS
   PROCEDURE run;
END ut_hello_world#;
/

CREATE OR REPLACE PACKAGE BODY ut_hello_world#
IS

   PROCEDURE TEST (
      i_descn     varchar2,
      i_exp       varchar2,
      i_act       varchar2
   )
   IS
   BEGIN
      IF i_exp = i_act THEN
         dbms_output.put_line('SUCCESS: ' || i_descn);
      ELSE
         dbms_output.put_line(
            'FAILURE: '   || i_descn || 
            ': expected ''' || NVL('' || i_exp, 'NULL') || 
            ''', but got '''  || NVL('' || i_act, 'null') || '''!'
         );
      END IF;
   END TEST;

   PROCEDURE run
   IS
   BEGIN
      TEST(
         i_descn  => 'no name',
         i_exp    => 'Hello, World!',
         i_act    => hello_world#.hello()
      );
      
      TEST(
         i_descn  => 'sample name',
         i_exp    => 'Hello, Alice!',
         i_act    => hello_world#.hello('Alice')
      );
      
      TEST(
         i_descn  => 'other sample name',
         i_exp    => 'Hello, Bob!',
         i_act    => hello_world#.hello('Bob')
      );
   EXCEPTION
      WHEN others THEN
         dbms_output.put_line('Test execution failed.');
         dbms_output.put_line(sqlerrm);
   END run;

END ut_hello_world#;
/

BEGIN
   ut_hello_world#.run;
END;
/

Version data entries

154 entries across 154 versions & 1 rubygems

Version Path
trackler-2.2.1.159 tracks/plsql/exercises/hello-world/ut_hello_world#.plsql
trackler-2.2.1.158 tracks/plsql/exercises/hello-world/ut_hello_world#.plsql
trackler-2.2.1.157 tracks/plsql/exercises/hello-world/ut_hello_world#.plsql
trackler-2.2.1.156 tracks/plsql/exercises/hello-world/ut_hello_world#.plsql
trackler-2.2.1.155 tracks/plsql/exercises/hello-world/ut_hello_world#.plsql
trackler-2.2.1.154 tracks/plsql/exercises/hello-world/ut_hello_world#.plsql
trackler-2.2.1.153 tracks/plsql/exercises/hello-world/ut_hello_world#.plsql
trackler-2.2.1.152 tracks/plsql/exercises/hello-world/ut_hello_world#.plsql
trackler-2.2.1.151 tracks/plsql/exercises/hello-world/ut_hello_world#.plsql
trackler-2.2.1.150 tracks/plsql/exercises/hello-world/ut_hello_world#.plsql
trackler-2.2.1.149 tracks/plsql/exercises/hello-world/ut_hello_world#.plsql
trackler-2.2.1.148 tracks/plsql/exercises/hello-world/ut_hello_world#.plsql
trackler-2.2.1.147 tracks/plsql/exercises/hello-world/ut_hello_world#.plsql
trackler-2.2.1.146 tracks/plsql/exercises/hello-world/ut_hello_world#.plsql
trackler-2.2.1.145 tracks/plsql/exercises/hello-world/ut_hello_world#.plsql
trackler-2.2.1.144 tracks/plsql/exercises/hello-world/ut_hello_world#.plsql
trackler-2.2.1.143 tracks/plsql/exercises/hello-world/ut_hello_world#.plsql
trackler-2.2.1.142 tracks/plsql/exercises/hello-world/ut_hello_world#.plsql
trackler-2.2.1.141 tracks/plsql/exercises/hello-world/ut_hello_world#.plsql
trackler-2.2.1.140 tracks/plsql/exercises/hello-world/ut_hello_world#.plsql