open Engine_part_1 open Engine_part_2 let suite = ( "engine", [ Alcotest.test_case "the first table not found" `Quick test_the_first_table_not_found; Alcotest.test_case "row_values keeps its registers" `Quick test_row_values_keeps_its_registers; Alcotest.test_case "row_values lowers once" `Quick test_row_values_lowers_once; Alcotest.test_case "row_values refuses before a row" `Quick test_row_values_refuses_before_a_row; Alcotest.test_case "a closed subquery needs no scope" `Quick test_a_closed_subquery_needs_no_scope; Alcotest.test_case "a name is one name however spelled" `Quick test_names_fold; Alcotest.test_case "a write names its columns however spelled" `Quick test_names_fold_writes; Alcotest.test_case "names fold ASCII only" `Quick test_names_fold_ascii_only; Alcotest.test_case "CREATE / INSERT / SELECT over Spi" `Quick test_create_insert_select; Alcotest.test_case "a VALUES tuple holds expressions" `Quick test_insert_values_are_expressions; Alcotest.test_case "an INSERT's column list states a width" `Quick test_an_insert_column_list_states_a_width; Alcotest.test_case "UPDATE / DELETE over Spi" `Quick test_update_delete; Alcotest.test_case "DROP TABLE" `Quick test_drop_table; Alcotest.test_case "CREATE and DROP INDEX through the store" `Quick test_create_index; Alcotest.test_case "IF EXISTS and IF NOT EXISTS are no-ops" `Quick test_if_exists_is_a_no_op; Alcotest.test_case "join over Spi base tables" `Quick test_join; Alcotest.test_case "every inner-join source is hashed" `Quick test_every_join_source_is_hashed; Alcotest.test_case "a multi-key join hashes every key" `Quick test_a_multi_key_join_hashes_every_key; Alcotest.test_case "a multi-key join keeps NOCASE on each key" `Quick test_a_multi_key_join_keeps_nocase_on_each_key; Alcotest.test_case "a multi-key join keeps numeric equality" `Quick test_a_multi_key_join_keeps_numeric_equality_on_each_key; Alcotest.test_case "a multi-key join never matches NULL" `Quick test_a_multi_key_join_never_matches_null; Alcotest.test_case "aggregate / compound / recursive WITH" `Quick test_aggregate_compound_cte; Alcotest.test_case "group_concat separator is per row" `Quick test_group_concat_separator; Alcotest.test_case "DISTINCT / FILTER / ORDER BY aggregates" `Quick test_aggregate_decorations; Alcotest.test_case "aggregate answers at the edges" `Quick test_aggregate_edges; Alcotest.test_case "which groups exist and which rows share one" `Quick test_grouping_edges; Alcotest.test_case "iif in a grouped select" `Quick test_iif_in_a_grouped_select; Alcotest.test_case "DISTINCT over every aggregate" `Quick test_distinct_over_every_aggregate; Alcotest.test_case "a window over a GROUP BY's rows" `Quick test_window_over_groups; Alcotest.test_case "a bare column follows the last min/max" `Quick test_a_bare_column_follows_the_last_min_max; Alcotest.test_case "a window on the left of a membership" `Quick test_window_inside_a_membership; Alcotest.test_case "a windowed projection reads column affinity" `Quick test_window_reads_column_affinity; Alcotest.test_case "HAVING reads a result alias" `Quick test_having_reads_a_result_alias; Alcotest.test_case "a compound ORDER BY names a result column" `Quick test_compound_order_by_names_a_result_column; Alcotest.test_case "an ordinal out of range is refused" `Quick test_ordinal_out_of_range_is_refused; Alcotest.test_case "LIMIT takes a lossless integer" `Quick test_limit_takes_a_lossless_integer; Alcotest.test_case "HAVING honours an operand's COLLATE" `Quick test_having_honours_an_operand_collation; Alcotest.test_case "HAVING takes IS" `Quick test_having_is; Alcotest.test_case "a HAVING IS collates like a comparison" `Quick test_having_is_collates; Alcotest.test_case "an unknown collating sequence" `Quick test_unknown_collating_sequence; Alcotest.test_case "min, max and nullif read a sequence" `Quick test_needcoll_functions; Alcotest.test_case "min, max and nullif read a declared sequence" `Quick test_needcoll_functions_read_a_declared_sequence; Alcotest.test_case "a declared sequence stops at the call" `Quick test_a_declared_sequence_stops_at_the_call; Alcotest.test_case "an explicit sequence climbs out of the call" `Quick test_an_explicit_sequence_climbs_out_of_the_call; Alcotest.test_case "the group row strips a spent COLLATE" `Quick test_group_row_strips_a_collate; Alcotest.test_case "an unspent COLLATE passes through" `Quick test_an_unspent_collate_passes_through; Alcotest.test_case "an in-call ORDER BY reads a sequence" `Quick test_an_in_call_order_by_reads_a_sequence; Alcotest.test_case "an in-call ORDER BY reads a declared sequence" `Quick test_an_in_call_order_by_reads_a_declared_sequence; Alcotest.test_case "a comparing fold reads a sequence" `Quick test_a_comparing_fold_reads_a_sequence; Alcotest.test_case "a DISTINCT aggregate takes an ORDER BY" `Quick test_a_distinct_aggregate_takes_an_order_by; Alcotest.test_case "a DISTINCT aggregate takes exactly one argument" `Quick test_a_distinct_aggregate_takes_exactly_one_argument; Alcotest.test_case "a call is resolved before the first row" `Quick test_a_call_is_resolved_before_the_first_row; Alcotest.test_case "an UPDATE names its table under an alias" `Quick test_an_update_names_its_table_under_an_alias; Alcotest.test_case "an INTEGER PRIMARY KEY is the rowid" `Quick test_an_integer_primary_key_is_the_rowid; Alcotest.test_case "a key written as text is its integer" `Quick test_a_key_written_as_text_is_its_integer; Alcotest.test_case "a table PRIMARY KEY is the rowid" `Quick test_a_table_primary_key_is_the_rowid; Alcotest.test_case "a key it cannot build is refused" `Quick test_a_key_it_cannot_build_is_refused; Alcotest.test_case "a rowid spelling names the key with no alias" `Quick test_a_rowid_spelling_names_the_key_with_no_alias; Alcotest.test_case "the smallest integer literal" `Quick test_the_smallest_integer_literal; Alcotest.test_case "comparison affinity reads sqlite3's numbers" `Quick test_comparison_affinity_reads_sqlite_numbers; Alcotest.test_case "a comparison applies one affinity to both operands" `Quick test_comparison_affinity_matrix; Alcotest.test_case "IN and IS take the comparison affinity" `Quick test_in_and_is_take_the_comparison_affinity; Alcotest.test_case "IN (SELECT) reads the subquery's affinity" `Quick test_in_select_reads_the_subquerys_affinity; Alcotest.test_case "a derived table's columns carry affinity" `Quick test_a_derived_tables_columns_carry_affinity; Alcotest.test_case "IS and BETWEEN take a signed operand" `Quick test_is_and_between_take_a_signed_operand; Alcotest.test_case "a write's WHERE takes the same affinity" `Quick test_write_predicates_take_the_same_affinity; Alcotest.test_case "unsupported shapes fail loud" `Quick test_unsupported_is_loud; Alcotest.test_case "RAISE outside a trigger program" `Quick test_raise_outside_a_trigger; Alcotest.test_case "a stored expression reaches the connection's functions" `Quick test_a_stored_expression_reaches_the_connections_functions; Alcotest.test_case "a schema qualifier" `Quick test_schema_qualifier; Alcotest.test_case "an unlowerable SELECT raises Failure" `Quick test_unlowerable_select_is_failure; Alcotest.test_case "a write is prepared as sqlite3 prepares it" `Quick test_a_write_is_prepared_as_sqlite3_prepares_it; Alcotest.test_case "the inner side is sought once per outer row" `Quick test_seeks_per_outer_row; Alcotest.test_case "a seek from the outer row: NULL and duplicate keys" `Quick test_null_and_duplicate_keys; Alcotest.test_case "a declined lookup reads the relation" `Quick test_a_declined_lookup_reads_the_relation; Alcotest.test_case "a seek compares under the index collation" `Quick test_a_seek_compares_under_the_index_collation; Alcotest.test_case "a trigger program is this domain's alone" `Quick test_a_trigger_program_is_this_domains_alone; ] )