Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Prepare tests for lexical module loading
  • Loading branch information
niner committed Oct 26, 2016
1 parent 75d2d43 commit 4ce29ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
18 changes: 4 additions & 14 deletions t/01-Basic.t
Expand Up @@ -4,12 +4,12 @@ use Test;
#DBIsh should can load the following, 'cus shipped
my \drvs = <Oracle Pg SQLite TestMock mysql>;

plan drvs.elems * 6 + 17;
plan drvs.elems * 6 + 8;

use-ok 'DBIish', 'DBIish can be use-d';
use DBIish;

my \DBIish = ::('DBIish');
ok DBIish !~~ Failure, "Class is available";
my \DBIish-class = ::('DBIish');
ok DBIish-class !~~ Failure, "Class is available";

for <connect install-driver> {
ok DBIish.^method_table{$_}:exists, "Method $_";
Expand All @@ -20,16 +20,6 @@ given DBIish.^ver {
ok $_ gt v0.0.0, "Greter than v.0.0.0, (v$_)";
}

# DBIish should load the following
for < DBIish::SQLType
DBDish DBDish::Driver DBDish::Connection
DBDish::StatementHandle DBDish::ErrorHandling
X::DBDish::DBError X::DBDish::ConnectionFailed
>
{
ok ::("$_") !~~ Failure, "Loaded $_";
}

for drvs {
my $drv;
lives-ok {
Expand Down
5 changes: 3 additions & 2 deletions t/03-lib-util.t
@@ -1,9 +1,10 @@
use v6;
use Test;
constant is-win = Rakudo::Internals.IS-WIN();
plan 6;
plan 5;

use NativeLibs;

use-ok 'NativeLibs';
ok (my \Util = ::('NativeLibs::Searcher')) !~~ Failure, 'Class Searcher exists';
ok (my \Loader = ::('NativeLibs::Loader')) !~~ Failure, 'Class Loader exists';
my $sub = Util.at-runtime(is-win ?? 'libmysql' !! 'mysqlclient', 'mysql_init', 16..20);
Expand Down

0 comments on commit 4ce29ec

Please sign in to comment.