File tree Expand file tree Collapse file tree 1 file changed +34
-1
lines changed Expand file tree Collapse file tree 1 file changed +34
-1
lines changed Original file line number Diff line number Diff line change 1
1
use QAST ;
2
2
3
- plan (70 );
3
+ plan (72 );
4
4
5
5
# Following a test infrastructure.
6
6
sub compile_qast ($ qast ) {
@@ -1066,3 +1066,36 @@ is_qast(
1066
1066
),
1067
1067
' hilarious' ,
1068
1068
' hllize' );
1069
+
1070
+ test_qast_result(
1071
+ QAST ::CompUnit. new (
1072
+ : hll<foo >,
1073
+ QAST ::Block. new (
1074
+ QAST ::Op. new (: op<bindcurhllsym >,
1075
+ QAST ::SVal. new (: value<key1 >),
1076
+ QAST ::IVal. new (: value(100 ))
1077
+ ),
1078
+ QAST ::Op. new (: op<bindhllsym >,
1079
+ QAST ::SVal. new (: value<bar >),
1080
+ QAST ::SVal. new (: value<key1 >),
1081
+ QAST ::IVal. new (: value(200 ))
1082
+ ),
1083
+ QAST ::Op. new (: op<bindhllsym >,
1084
+ QAST ::SVal. new (: value<foo >),
1085
+ QAST ::SVal. new (: value<key2 >),
1086
+ QAST ::IVal. new (: value(300 ))
1087
+ ),
1088
+ QAST ::Op. new (
1089
+ : op(' list' ),
1090
+ QAST ::Op. new (: op<gethllsym >, QAST ::SVal. new (: value<foo >), QAST ::SVal. new (: value<key1 >)),
1091
+ QAST ::Op. new (: op<getcurhllsym >, QAST ::SVal. new (: value<key2 >))
1092
+ )
1093
+ )
1094
+ ),
1095
+
1096
+ -> $ r {
1097
+ ok ($ r [0 ] == 100 , ' bindcurhllsym/gethllsym' );
1098
+ ok ($ r [1 ] == 300 , ' bindhllsym/getcurhllsym' );
1099
+ }
1100
+ );
1101
+
You can’t perform that action at this time.
0 commit comments