AI-TensorFlow-Libtensorflow

 view release on metacpan or  search on metacpan

t/upstream/CAPI/002_Status.t  view on Meta::CPAN

#!/usr/bin/env perl

use Test2::V0;
use lib 't/lib';
use TF_TestQuiet;
use aliased 'AI::TensorFlow::Libtensorflow';
use aliased 'AI::TensorFlow::Libtensorflow::Status';

subtest "(CAPI, Status)" => sub {
	my $s = Status->New;
	is $s->GetCode, AI::TensorFlow::Libtensorflow::Status::OK, 'OK code';
	is $s->Message, '', 'empty message';

	note 'Set status to CANCELLED';
	$s->SetStatus('CANCELLED', 'cancel');

	is $s->GetCode, AI::TensorFlow::Libtensorflow::Status::CANCELLED, 'CANCELLED code';
	is $s->Message, 'cancel', 'check set message';
};

done_testing;



( run in 1.611 second using v1.01-cache-2.11-cpan-8450f2e95f3 )