From c802d62a3afc99c784cfbb7ca2033930d6537555 Mon Sep 17 00:00:00 2001 From: dakkar Date: Mon, 29 Aug 2011 18:22:24 +0100 Subject: full-machine and tests --- t/basic-enigma.t | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 t/basic-enigma.t (limited to 't/basic-enigma.t') diff --git a/t/basic-enigma.t b/t/basic-enigma.t new file mode 100644 index 0000000..0760737 --- /dev/null +++ b/t/basic-enigma.t @@ -0,0 +1,28 @@ +#!perl +use DAKKAR::p 'test'; +use Test::Enigmatic; +use Enigmatic::Machine; + +Test::Enigmatic::test_full_machine( + sub { + Enigmatic::Machine->new({ + reflector => 'B', + rotors => [ 'III', 'II', 'I' ], + }); + }, + 'AAAAA', + 'BDZGO'); + +Test::Enigmatic::test_full_machine( + sub { + Enigmatic::Machine->new({ + reflector => 'B', + rotors => [ 'III', 'II', 'I' ], + ring_settings => ['B','B','B'], + }); + }, + 'AAAAA', + 'EWTYX'); + + +done_testing(); -- cgit v1.2.3