3 # This file is part of Language::Befunge.
4 # Copyright (c) 2001-2008 Jerome Quelin, all rights reserved.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the same terms as Perl itself.
11 use Language::Befunge::Ops;
16 use Language::Befunge::Interpreter;
17 use Language::Befunge::IP;
18 use Language::Befunge::Ops;
19 use Test::More tests => 2;
24 $lbi = Language::Befunge::Interpreter->new;
25 $ip = Language::Befunge::IP->new;
26 $lbi->set_curip( $ip );
28 $ip->spush( 21, 42, 63 );
29 Language::Befunge::Ops::stack_swap( $lbi );
30 is( $ip->spop, 42, 'stack_swap promotes to front previous value' );
31 is( $ip->spop, 63, 'stack_swap hides current value one-level depth' );