@@ -727,20 +727,23 @@ TEST_CASE(
727727 }
728728}
729729
730- SCENARIO (
730+ TEMPLATE_TEST_CASE (
731731 " Bitwise \" AND\" expressions are converted to SMT terms" ,
732- " [core][smt2_incremental]" )
732+ " [core][smt2_incrzmental]" ,
733+ signedbv_typet,
734+ unsignedbv_typet,
735+ bv_typet)
733736{
734737 auto test = expr_to_smt_conversion_test_environmentt::make (test_archt::i386);
735- GIVEN (" three integer bitvectors and their smt-term equivalents" )
738+ GIVEN (" three bitvectors and their smt-term equivalents" )
736739 {
737740 const smt_termt smt_term_one = smt_bit_vector_constant_termt{1 , 8 };
738741 const smt_termt smt_term_three = smt_bit_vector_constant_termt{3 , 8 };
739742 const smt_termt smt_term_five = smt_bit_vector_constant_termt{5 , 8 };
740743
741- const auto one_bvint = from_integer (1 , signedbv_typet {8 });
742- const auto three_bvint = from_integer (3 , signedbv_typet {8 });
743- const auto five_bvint = from_integer (5 , signedbv_typet {8 });
744+ const auto one_bvint = from_integer (1 , TestType {8 });
745+ const auto three_bvint = from_integer (3 , TestType {8 });
746+ const auto five_bvint = from_integer (5 , TestType {8 });
744747
745748 WHEN (" a bitand_exprt with two of them as arguments is converted" )
746749 {
@@ -766,8 +769,7 @@ SCENARIO(
766769 // support direct construction with multiple operands - so we have to
767770 // construct its parent class and downcast it.
768771 const exprt::operandst and_operands{one_bvint, three_bvint, five_bvint};
769- const multi_ary_exprt first_step{
770- ID_bitand, and_operands, signedbv_typet{8 }};
772+ const multi_ary_exprt first_step{ID_bitand, and_operands, TestType{8 }};
771773 const auto bitand_expr = to_bitand_expr (first_step);
772774
773775 const auto constructed_term = test.convert (bitand_expr);
@@ -800,20 +802,23 @@ SCENARIO(
800802 }
801803}
802804
803- SCENARIO (
805+ TEMPLATE_TEST_CASE (
804806 " Bitwise \" OR\" expressions are converted to SMT terms" ,
805- " [core][smt2_incremental]" )
807+ " [core][smt2_incremental]" ,
808+ signedbv_typet,
809+ unsignedbv_typet,
810+ bv_typet)
806811{
807812 auto test = expr_to_smt_conversion_test_environmentt::make (test_archt::i386);
808- GIVEN (" three integer bitvectors and their smt-term equivalents" )
813+ GIVEN (" three bitvectors and their smt-term equivalents" )
809814 {
810815 const smt_termt smt_term_one = smt_bit_vector_constant_termt{1 , 8 };
811816 const smt_termt smt_term_three = smt_bit_vector_constant_termt{3 , 8 };
812817 const smt_termt smt_term_five = smt_bit_vector_constant_termt{5 , 8 };
813818
814- const auto one_bvint = from_integer (1 , signedbv_typet {8 });
815- const auto three_bvint = from_integer (3 , signedbv_typet {8 });
816- const auto five_bvint = from_integer (5 , signedbv_typet {8 });
819+ const auto one_bvint = from_integer (1 , TestType {8 });
820+ const auto three_bvint = from_integer (3 , TestType {8 });
821+ const auto five_bvint = from_integer (5 , TestType {8 });
817822
818823 WHEN (" a bitor_exprt with two of them as arguments is converted" )
819824 {
@@ -840,8 +845,7 @@ SCENARIO(
840845 WHEN (" a ternary bitor_exprt gets connverted to smt terms" )
841846 {
842847 const exprt::operandst or_operands{one_bvint, three_bvint, five_bvint};
843- const multi_ary_exprt first_step{
844- ID_bitor, or_operands, signedbv_typet{8 }};
848+ const multi_ary_exprt first_step{ID_bitor, or_operands, TestType{8 }};
845849 const auto bitor_expr = to_bitor_expr (first_step);
846850
847851 const auto constructed_term = test.convert (bitor_expr);
@@ -877,20 +881,23 @@ SCENARIO(
877881 }
878882}
879883
880- SCENARIO (
884+ TEMPLATE_TEST_CASE (
881885 " Bitwise \" XOR\" expressions are converted to SMT terms" ,
882- " [core][smt2_incremental]" )
886+ " [core][smt2_incremental]" ,
887+ signedbv_typet,
888+ unsignedbv_typet,
889+ bv_typet)
883890{
884891 auto test = expr_to_smt_conversion_test_environmentt::make (test_archt::i386);
885- GIVEN (" three integer bitvectors and their smt-term equivalents" )
892+ GIVEN (" three bitvectors and their smt-term equivalents" )
886893 {
887894 const smt_termt smt_term_one = smt_bit_vector_constant_termt{1 , 8 };
888895 const smt_termt smt_term_three = smt_bit_vector_constant_termt{3 , 8 };
889896 const smt_termt smt_term_five = smt_bit_vector_constant_termt{5 , 8 };
890897
891- const auto one_bvint = from_integer (1 , signedbv_typet {8 });
892- const auto three_bvint = from_integer (3 , signedbv_typet {8 });
893- const auto five_bvint = from_integer (5 , signedbv_typet {8 });
898+ const auto one_bvint = from_integer (1 , TestType {8 });
899+ const auto three_bvint = from_integer (3 , TestType {8 });
900+ const auto five_bvint = from_integer (5 , TestType {8 });
894901
895902 WHEN (" a bitxor_exprt with two of them as arguments is converted" )
896903 {
@@ -913,8 +920,7 @@ SCENARIO(
913920 WHEN (" a ternary bitxor_exprt gets connverted to smt terms" )
914921 {
915922 const exprt::operandst xor_operands{one_bvint, three_bvint, five_bvint};
916- const multi_ary_exprt first_step{
917- ID_bitxor, xor_operands, signedbv_typet{8 }};
923+ const multi_ary_exprt first_step{ID_bitxor, xor_operands, TestType{8 }};
918924 const auto bitxor_expr = to_bitxor_expr (first_step);
919925
920926 const auto constructed_term = test.convert (bitxor_expr);
@@ -949,14 +955,17 @@ SCENARIO(
949955 }
950956}
951957
952- SCENARIO (
958+ TEMPLATE_TEST_CASE (
953959 " Bitwise \" NOT\" expressions are converted to SMT terms (1's complement)" ,
954- " [core][smt2_incremental]" )
960+ " [core][smt2_incremental]" ,
961+ signedbv_typet,
962+ unsignedbv_typet,
963+ bv_typet)
955964{
956965 auto test = expr_to_smt_conversion_test_environmentt::make (test_archt::i386);
957- GIVEN (" An integer bitvector" )
966+ GIVEN (" An bitvector" )
958967 {
959- const auto one_bvint = from_integer (1 , signedbv_typet {8 });
968+ const auto one_bvint = from_integer (1 , TestType {8 });
960969
961970 WHEN (" A bitnot_exprt is constructed and converted to an SMT term" )
962971 {
0 commit comments