Skip to content

Commit

Permalink
Refactor tests with new API
Browse files Browse the repository at this point in the history
  • Loading branch information
filipeom committed Feb 17, 2025
1 parent 7f9906b commit dbc082c
Show file tree
Hide file tree
Showing 41 changed files with 891 additions and 910 deletions.
5 changes: 3 additions & 2 deletions test/bitvector/test_bitvector.ml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ let test_comparisons () =

let test_rotate () =
let bv = make (z 0b1101) 4 in
assert (view (rotate_left bv 1) = z 0b1011);
assert (view (rotate_right bv 1) = z 0b1110)
let one = make (z 1) 4 in
assert (view (rotate_left bv one) = z 0b1011);
assert (view (rotate_right bv one) = z 0b1110)

let test_extensions () =
let bv = make (z 0b1010) 4 in
Expand Down
4 changes: 4 additions & 0 deletions test/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(library
(name smtml_test)
(modules test_harness)
(libraries smtml))
4 changes: 0 additions & 4 deletions test/regression/dune
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,3 @@
(applies_to test_issue_183)
(enabled_if
(not %{lib-available:colibri2.core})))

(tests
(names test_pr_77)
(libraries smtml))
28 changes: 0 additions & 28 deletions test/regression/test_pr_77.ml

This file was deleted.

40 changes: 17 additions & 23 deletions test/solver/dune
Original file line number Diff line number Diff line change
@@ -1,43 +1,37 @@
(library
(name smtml_tests)
(name smtml_test_solver)
(modules
test_bv
test_fp
test_harness
test_solver_params
test_solver
test_lia
test_lra
test_optimizer)
(libraries smtml))
(libraries smtml smtml_test))

(test
(name test_z3)
(modules test_z3)
(libraries smtml smtml_tests)
(name test_solver_z3)
(modules test_solver_z3)
(libraries smtml smtml_test_solver)
(build_if %{lib-available:z3}))

(test
(name test_colibri2)
(modules test_colibri2)
(libraries smtml_tests)
(name test_solver_colibri2)
(modules test_solver_colibri2)
(libraries smtml_test smtml_test_solver)
(build_if %{lib-available:colibri2.core}))

(test
(name test_bitwuzla)
(modules test_bitwuzla)
(libraries smtml_tests)
(name test_solver_bitwuzla)
(modules test_solver_bitwuzla)
(libraries smtml_test smtml_test_solver)
(build_if %{lib-available:bitwuzla-cxx}))

(test
(name test_cvc5)
(modules test_cvc5)
(libraries smtml_tests)
(name test_solver_cvc5)
(modules test_solver_cvc5)
(libraries smtml_test smtml_test_solver)
(build_if %{lib-available:cvc5}))

(test
(name test_altergo)
(modules test_altergo)
(libraries smtml_tests)
(name test_solver_altergo)
(modules test_solver_altergo)
(libraries smtml_test smtml_test_solver)
(build_if
(and %{lib-available:alt-ergo-lib} %{lib-available:dolmen_model})))
16 changes: 0 additions & 16 deletions test/solver/test_altergo.ml

This file was deleted.

10 changes: 0 additions & 10 deletions test/solver/test_bitwuzla.ml

This file was deleted.

32 changes: 0 additions & 32 deletions test/solver/test_bv.ml

This file was deleted.

14 changes: 0 additions & 14 deletions test/solver/test_colibri2.ml

This file was deleted.

10 changes: 0 additions & 10 deletions test/solver/test_cvc5.ml

This file was deleted.

51 changes: 0 additions & 51 deletions test/solver/test_fp.ml

This file was deleted.

53 changes: 0 additions & 53 deletions test/solver/test_harness.ml

This file was deleted.

14 changes: 0 additions & 14 deletions test/solver/test_lia.ml

This file was deleted.

18 changes: 0 additions & 18 deletions test/solver/test_lra.ml

This file was deleted.

5 changes: 3 additions & 2 deletions test/solver/test_optimizer.ml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
open Smtml

(* TODO: Move this some place else? *)
module Make (M : Mappings_intf.S) = struct
open Test_harness
open Smtml_test.Test_harness
module Optimizer = Optimizer.Make (M)

let () =
let test () =
let open Infix in
let opt = Optimizer.create () in
let x = symbol "x" Ty_int in
Expand Down
Loading

0 comments on commit dbc082c

Please sign in to comment.