From 61f964216b16b25200e2a2ac961f7444c0570daf Mon Sep 17 00:00:00 2001 From: dakkar Date: Thu, 10 Nov 2016 13:27:18 +0000 Subject: split into input / qrcode --- t/input.t | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 t/input.t (limited to 't/input.t') diff --git a/t/input.t b/t/input.t new file mode 100644 index 0000000..91e8afc --- /dev/null +++ b/t/input.t @@ -0,0 +1,33 @@ +#!perl +use strict; +use warnings; +use Test2::Bundle::Extended; +use Data::QRCode::Input; + +my $input = Data::QRCode::Input->new(); + +$input->version(12); +$input->error_correction_level(Data::QRCode::Input::ECLEVEL_M); + +is( + $input->version, + 12, + 'version should round-trip', +); + +is( + $input->error_correction_level, + Data::QRCode::Input::ECLEVEL_M, + 'ec level should round-trip', +); + +is( + $input->append( + Data::QRCode::Input::MODE_8, + 'some data', + ), + 0, + 'append should work and return 0 on success', +); + +done_testing; -- cgit v1.2.3