Eve Feature Tests
The feature tests of Eve (the conformity tests), by level. Every test is a script (or a project folder) with its expected output in a comment block at the end: a driver passes when the machine prints exactly that and ends with the expected exit code. Each row shows what the test checks, taken from the first comment line of the file, and a link to the file in the code viewer. The tests are the specification that an implementation must pass:
python script/runtest.py all runs them, and Smoke and Performance have their own pages.Level 1: Scripts
The language of a single script, 97 tests. The folder on GitHub.
| Code | Test | What it checks | Source |
|---|---|---|---|
| a01 | a01_driver | Test primary aspect structure and single line comments | a01_driver.eve |
| a02 | a02_comments | Every comment form of the language, then a negative end | a02_comments.eve |
| a03 | a03_print | print writes a string and a new line; no import is needed | a03_print.eve |
| a04 | a04_shebang_error | a file has no #! line: Eve has no free scripts, every program is an aspect | a04_shebang_error.eve |
| a05 | a05_print_write | print adds a new line and separates its arguments with sep, write adds nothing; a list is one argument | a05_print_write.eve |
| a06 | a06_new_set_let | new creates variables, set creates constants, let changes a value | a06_new_set_let.eve |
| a07 | a07_arithmetic | numeric operators and their precedence | a07_arithmetic.eve |
| a08 | a08_logic | relation and logical operators, conditional statement and expression | a08_logic.eve |
| a09 | a09_literals | literals of the primitive types | a09_literals.eve |
| a100 | a100_script_param_missing | a parameter of process main without a default and without a value is a usage error: exit 64, the help is printed | a100_script_param_missing.eve |
| a101 | a101_scopes | where a name lives: the aspect (hoisted, shared with its functions), a process, a loop (one scope for the header and all the cycles), an if (no scope) | a101_scopes.eve |
| a102 | a102_scope_hidden_local | a function does not see the variables of a process, and the variable of a loop is gone after done: both are compile errors | a102_scope_hidden_local.eve |
| a103 | a103_scope_loop_variable | the control variable of a for loop and the variables of its body are gone after done: using them is a compile error | a103_scope_loop_variable.eve |
| a104 | a104_scope_loop_redeclare | a loop has one scope for the header and all its cycles: a new written in the body is run again at the second cycle and fails, a name used by all cycles is declared before the loop | a104_scope_loop_redeclare.eve |
| a105 | a105_scope_shadow_in_loop | a name that exists outside a loop is shadowed by a new in the body at the first cycle; the second cycle fails because the loop scope already has the name | a105_scope_shadow_in_loop.eve |
| a106 | a106_list_functions | list functions: sort, reverse, sum, min, max, contains, index_of, unique, take, drop, zip, map, filter, reduce, any, all (lists.md) | a106_list_functions.eve |
| a107 | a107_list_errors | list functions with a wrong argument or a wrong element are the error $err_argument (17); each case is caught by a function with a recover region | a107_list_errors.eve |
| a108 | a108_map_functions | map functions: merge and invert give a new map and never change the receiver (maps.md) | a108_map_functions.eve |
| a109 | a109_string_more | string functions of the core library: reverse, repeat, pad_start, pad_end, lines, upper and lower beyond ASCII (strings.md) | a109_string_more.eve |
| a10 | a10_strings | strings are immutable UTF-8 text | a10_strings.eve |
| a110 | a110_math_basic | math library: basic, explog, numtheory, and the one module math (math.md) | a110_math_basic.eve |
| a111 | a111_math_trig | math library: trigonometry (math.md) | a111_math_trig.eve |
| a112 | a112_math_constants | math library: constants exported with set (math.md) | a112_math_constants.eve |
| a113 | a113_math_linear | math library: vectors and matrices (math.md) | a113_math_linear.eve |
| a114 | a114_math_random | math library: random generator, seeded and not seeded (math.md) | a114_math_random.eve |
| a115 | a115_math_random_unseeded | math library: an unseeded generator gives values of known type, written as {Type} in the expected output (math.md) | a115_math_random_unseeded.eve |
| a116 | a116_eve_dir_asp | the variables $EVE_DIR (the folder of the Eve runtime) and $EVE_ASP (the aspect folder, "asp" by default) are read-only Strings | a116_eve_dir_asp.eve |
| a11 | a11_interpolation | placeholders {name} and {name % format}: a name, a literal or a simple expression, written by its type; \{ \} are literal braces; {U+H} Unicode (formats are a draft) | a11_interpolation.eve |
| a12 | a12_if | if, else if, else and the conditional statement | a12_if.eve |
| a13 | a13_while | while loop with a header, break and else; then was removed, the code goes after done; | a13_while.eve |
| a14 | a14_for | for loop over ranges and collections | a14_for.eve |
| a15 | a15_match | match with values, lists of values, ranges, other, one and all | a15_match.eve |
| a16 | a16_ordinal | an Ordinal is a set of named integer values; the first value is 1 unless one is given | a16_ordinal.eve |
| a17 | a17_list | list: literal, index, append, remove, capture, delete, builder, deconstruct | a17_list.eve |
| a18 | a18_array | array: literal, index, slice, view and clone, bulk assignment, builder | a18_array.eve |
| a19 | a19_matrix | matrix: two indexes, last index, absolute index, [*] selects a dimension | a19_matrix.eve |
| a20 | a20_dataset | DataSet: sorted unique values, union, intersection, difference | a20_dataset.eve |
| a21 | a21_datamap | DataMap: a sorted map of key:value pairs; quoted or numeric keys | a21_datamap.eve |
| a22 | a22_object | Object: unquoted keys make an object, quoted or numeric keys make a DataMap | a22_object.eve |
| a23 | a23_clone_view | := shares a collection or an object,:: makes a deep copy, native values are always copied | a23_clone_view.eve |
| a27 | a27_text_literal | a text literal is raw and keeps the line breaks; the indentation of the closing quotes is removed | a27_text_literal.eve |
| a28 | a28_regex | regular expressions: =~ matches, not (...) negates; a string that starts with / is a regex literal and keeps its backslashes | a28_regex.eve |
| a29 | a29_expect_fail | a failed expect ends the process with exit code 2 | a29_expect_fail.eve |
| a30 | a30_over | over ends the process it is in with exit code 0 | a30_over.eve |
| a31 | a31_recover | an error jumps to recover; reaching the end of recover handles the error | a31_recover.eve |
| a32 | a32_finalize | finalize runs after the process ends normally, and after recover | a32_finalize.eve |
| a33 | a33_over_finalize | over skips recover but runs finalize: a clean exit never skips cleanup | a33_over_finalize.eve |
| a34 | a34_jobs | jobs: retry runs a failed job again, resume goes on after it | a34_jobs.eve |
| a35 | a35_index_error | index 0 is an error: indexes start at 1 | a35_index_error.eve |
| a36 | a36_map_key_error | += on a missing key of a map raises an error | a36_map_key_error.eve |
| a37 | a37_division_error | a division by zero raises an error, also for Real: no infinity, no NaN | a37_division_error.eve |
| a38 | a38_matrix_index | matrix and tensor indexes: [x, y] is the same as [x][y]; a range selects a part | a38_matrix_index.eve |
| a39 | a39_repeat | loop tested at the end: loop … do … repeat [while c]; and skip | a39_repeat.eve |
| a43 | a43_let_creates_name | let changes names and creates the ones that are missing, by type inference | a43_let_creates_name.eve |
| a44 | a44_bare_assignment | a change without let is a syntax error | a44_bare_assignment.eve |
| a45 | a45_redeclare | redeclaring a name in the same scope is an error | a45_redeclare.eve |
| a46 | a46_light_assignment | = is the light assignment of a declaration; it never changes a variable | a46_light_assignment.eve |
| a47 | a47_string_plus_number | + between a string and a number is a type error; <+ converts the number | a47_string_plus_number.eve |
| a48 | a48_single_quote_text | a rune holds one code point; 'one' is a lexical error | a48_single_quote_text.eve |
| a49 | a49_stop_in_job | stop ends a job without error; the process goes on with the next statement | a49_stop_in_job.eve |
| a50 | a50_exit | exit ends the process without error and runs finalize | a50_exit.eve |
| a51 | a51_unhandled_error | an error without recover ends the process with the exit code 4, after finalize | a51_unhandled_error.eve |
| a52 | a52_assert | a failed assert is an error with code 3: the process stops when it is not recovered | a52_assert.eve |
| a53 | a53_abort | abort in recover ends the process, runs finalize and passes the error on | a53_abort.eve |
| a54 | a54_panic | panic ends the whole application at once with code 1, without finalize | a54_panic.eve |
| a57 | a57_conversion | explicit conversions do what the developer asked: floor, ceiling, round, parse (from demo/explicit_coercion.eve and demo/string_to_number.eve) | a57_conversion.eve |
| a58 | a58_rune_range | a range of runes: ('a'..'c') visits the code points in order (from demo/symbol_range.eve) | a58_rune_range.eve |
| a59 | a59_optional_null | a variable without a value has the zero value of its type, never null; an optional type T? may hold null (from demo/null_strings.eve) | a59_optional_null.eve |
| a60 | a60_process_args | the process receives the command-line arguments; a vararg collects them (from demo/method_call.eve and demo/test_args.eve) | a60_process_args.eve |
| a62 | a62_multi_line | a statement ends with; so an expression or a literal may span several lines (from demo/multi_line.eve) | a62_multi_line.eve |
| a63 | a63_range_domain | a range is a domain of values: limits included or excluded, open ends, a step that sets the precision (from demo/domain_demo.eve and demo/numeric_range.eve) | a63_range_domain.eve |
| a66 | a66_bad_placeholder | in a string every unescaped brace opens a placeholder {name}; a literal brace is \{ or \} | a66_bad_placeholder.eve |
| a68 | a68_undefined_name | an undefined name is a compile error: the script does not start | a68_undefined_name.eve |
| a75 | a75_raise_code | raise "text" creates an error with code 4 and that message | a75_raise_code.eve |
| a76 | a76_overflow | integer overflow is an error with its own code, 13 | a76_overflow.eve |
| a77 | a77_system_variable | a primary aspect can set a system variable and define its own $name | a77_system_variable.eve |
| a78 | a78_digit_separator | the digit separator _ is not accepted in a number: a lexical error | a78_digit_separator.eve |
| a80 | a80_let_capture_loop | in a loop a capture creates its name once: the next turns assign it, they do not create it again | a80_let_capture_loop.eve |
| a81 | a81_let_undeclared | let creates a missing name only in a capture: let y:= 5 with no y is an error | a81_let_undeclared.eve |
| a82 | a82_list_ends | list modifiers: <+ appends at the end, +> puts in front; the list stays after +> and before <+ | a82_list_ends.eve |
| a83 | a83_bulk_scalar | collection op scalar: the operator applies to every element | a83_bulk_scalar.eve |
| a84 | a84_bulk_string_error | a bulk operation never builds strings: a string element or scalar is an error | a84_bulk_string_error.eve |
| a85 | a85_then_removed | then no longer exists in match and loops: the code goes after done; (negative test) | a85_then_removed.eve |
| a86 | a86_string_slice | a string takes a range as index: s[a..b] is the substring of runes a to b, a copy (expressions.md) | a86_string_slice.eve |
| a87 | a87_string_functions | string functions: trim, upper, lower, starts_with, ends_with, contains, find, replace (strings.md, G-7) | a87_string_functions.eve |
| a88 | a88_datamap_methods | DataMap methods: has, get, keys, values, delete (G-5) | a88_datamap_methods.eve |
| a89 | a89_exit_code | over <code>; ends the process with the exit code, finalize still runs (G-2) | a89_exit_code.eve |
| a90 | a90_exit_code_range | an exit code from 1 to 5 belongs to the machine: a run-time error with code 4 (G-2) | a90_exit_code_range.eve |
| a91 | a91_method_as_name | method is a contextual word: a keyword where a declaration is expected, a name everywhere else (G-6) | a91_method_as_name.eve |
| a92 | a92_loops_and_calls | loops, calls and assignments that every engine must treat alike: break, skip, for with else, short circuit on a variable, compound assignment on a list, recursion | a92_loops_and_calls.eve |
| a93 | a93_os_pwd | $OS_PWD is the working folder of the program, read-only (CMD-05) | a93_os_pwd.eve |
| a94 | a94_env_variable | $NAME is an operating system environment variable, a String | a94_env_variable.eve |
| a95 | a95_error_warning | error(text) and warning(text) write a line on the standard error and go on | a95_error_warning.eve |
| a96 | a96_read_line | read(prompt) reads a line from the standard input and gives it as a String; at the end of the input it gives null | a96_read_line.eve |
| a97 | a97_eve_variables | the project variables $EVE_HOME, $EVE_LIB, $EVE_LIB_PATH, $EVE_CORE_DB and $EVE_OUT are Strings with the defaults of the table | a97_eve_variables.eve |
| a98 | a98_script_params | the arguments after the script and -p name=value become the parameters of process main, converted to their types | a98_script_params.eve |
| a99 | a99_script_help | eve script.eve -h prints the help made from the ** @param comments and the parameters of process main; the script does not run | a99_script_help.eve |
Level 2: Subprograms
A project: subprograms and aspects, 81 tests. The folder on GitHub.
| Code | Test | What it checks | Source |
|---|---|---|---|
| b01 | b01_apply_aspect | apply runs the main process of an aspect from asp/ and waits | b01_apply_aspect.eve |
| b01 | b01_test1 (variation) | variation 1 of b01: the same aspect, called in a loop with a computed argument | b01_test1.eve |
| b02 | b02_apply_output | an aspect gives results back through @ output parameters | b02_apply_output.eve |
| b02 | b02_test1 (variation) | variation 1 of b02: results used as inputs, in a loop | b02_test1.eve |
| b03 | b03_apply_state | each apply creates a new state of the aspect: a second call sees nothing of the first | b03_apply_state.eve |
| b03 | b03_test1 (variation) | variation 1 of b03: three applies, three fresh states | b03_test1.eve |
| b04 | b04_apply_named_args | apply with arguments by position, by name and with a default value | b04_apply_named_args.eve |
| b04 | b04_test1 (variation) | variation 1 of b04: every argument by name, in another order | b04_test1.eve |
| b05 | b05_apply_spread | spreading a list into positional arguments and a map into named arguments ( i) | b05_apply_spread.eve |
| b05 | b05_test1 (variation) | variation 1 of b05: spread of a whole list and of a whole map | b05_test1.eve |
| b06 | b06_aspect_error | an error not recovered in the aspect is raised in the primary aspect at the apply line | b06_aspect_error.eve |
| b06 | b06_test1 (variation) | variation 1 of b06: the error code of the aspect is the code of the raise | b06_test1.eve |
| b07 | b07_aspect_over | over in an aspect ends the aspect; the primary aspect goes on after apply | b07_aspect_over.eve |
| b07 | b07_test1 (variation) | variation 1 of b07: over in the aspect twice: the primary aspect goes on each time | b07_test1.eve |
| b08 | b08_aspect_panic | panic in an aspect ends the whole application with exit code 1 | b08_aspect_panic.eve |
| b08 | b08_test1 (variation) | variation 1 of b08: panic ends the application: the finalize of the primary aspect does not run | b08_test1.eve |
| b09 | b09_log_files | log_err and log_wrn write log files in the output folder out/ | b09_log_files.eve |
| b10 | b10_aspect_function | a function declared in an aspect is used by its main | b10_aspect_function.eve |
| b10 | b10_test1 (variation) | variation 1 of b10: the function of the aspect with its default and by name | b10_test1.eve |
| b11 | b11_aspect_procedure | a procedure of an aspect changes an aspect-level variable; the primary aspect's own variable is not touched | b11_aspect_procedure.eve |
| b11 | b11_test1 (variation) | variation 1 of b11: the state of the aspect is new in every call | b11_test1.eve |
| b12 | b12_aspect_fresh_state | main and the procedures of an aspect share its variables, and every apply starts them again | b12_aspect_fresh_state.eve |
| b12 | b12_test1 (variation) | variation 1 of b12: the list of the aspect is new in every call, in a loop | b12_test1.eve |
| b13 | b13_aspect_missing | apply of an aspect that has no file is an error before the run | b13_aspect_missing.eve |
| b14 | b14_aspect_too_many_args | more positional arguments than parameters is a check-time error | b14_aspect_too_many_args.eve |
| b14 | b14_test1 (variation) | variation 1 of b14: the right call: two arguments, then one | b14_test1.eve |
| b15 | b15_aspect_apply_aspect | an aspect may apply another aspect, by its name (it was a compile error with) | b15_aspect_apply_aspect.eve |
| b16 | b16_aspect_recover | an aspect recovers its own error: the primary aspect never sees it | b16_aspect_recover.eve |
| b16 | b16_test1 (variation) | variation 1 of b16: the aspect recovers its own error, twice | b16_test1.eve |
| b17 | b17_aspect_trace | an error nobody recovers: the error first, then the frames in order of call | b17_aspect_trace.eve |
| b18 | b18_lambda | a lambda is an anonymous function: held by a name, passed as an argument, held by a function type | b18_lambda.eve |
| b19 | b19_closure | a closure keeps the state of the function that made it; every apply makes new closures | b19_closure.eve |
| b20 | b20_aspect_unknown_param | an argument named like no parameter is a check-time error | b20_aspect_unknown_param.eve |
| b20 | b20_test1 (variation) | variation 1 of b20: the right name of the optional parameter | b20_test1.eve |
| b21 | b21_aspect_missing_arg | a missing mandatory argument is a check-time error | b21_aspect_missing_arg.eve |
| b21 | b21_test1 (variation) | variation 1 of b21: the mandatory argument by name | b21_test1.eve |
| b22 | b22_aspect_wrong_type | an argument of the wrong type is a check-time error | b22_aspect_wrong_type.eve |
| b23 | b23_aspect_default_exclusive | an aspect without a kind word is exclusive | b23_aspect_default_exclusive.eve |
| b24 | b24_aspect_second_process | an aspect may have a second process: a private one, called by its own main (it was an error with) | b24_aspect_second_process.eve |
| b25 | b25_aspect_driver_variable | an aspect can't read a variable of the primary aspect | b25_aspect_driver_variable.eve |
| b26 | b26_aspect_finalize | finalize of an aspect runs when main ends, also by over; then the primary aspect goes on | b26_aspect_finalize.eve |
| b26 | b26_test1 (variation) | variation 1 of b26: finalize in a loop, by return and by over | b26_test1.eve |
| b27 | b27_aspect_concurrent | a concurrent aspect can also be applied, one call after the other | b27_aspect_concurrent.eve |
| b27 | b27_test1 (variation) | variation 1 of b27: a concurrent aspect applied with other texts | b27_test1.eve |
| b28 | b28_aspect_folder | apply with a folder: the aspect is searched there first, then in asp/ and in the root | b28_aspect_folder.eve |
| b28 | b28_test1 (variation) | variation 1 of b28: only the aspect of the default folder | b28_test1.eve |
| b29 | b29_aspect_output_named | an @ output parameter that follows optional parameters is named at the call | b29_aspect_output_named.eve |
| b29 | b29_test1 (variation) | variation 1 of b29: the default exponent, then both by name | b29_test1.eve |
| b30 | b30_function | functions: result, named arguments, default values, several results | b30_function.eve |
| b31 | b31_procedure | procedures: no result, side effects, @ passes by reference, no @ passes a copy | b31_procedure.eve |
| b32 | b32_recursion | a function can call itself: Fibonacci (from demo/fibonacci.eve) | b32_recursion.eve |
| b33 | b33_function_without_result | a function must have a result: a subprogram without result is declared with procedure | b33_function_without_result.eve |
| b34 | b34_procedure_bang | a procedure is made for side effects and is never deterministic: it never ends with ! | b34_procedure_bang.eve |
| b35 | b35_exit_procedure | exit in a procedure leaves only the procedure; the process goes on | b35_exit_procedure.eve |
| b36 | b36_over_procedure | over in a procedure ends the whole process, not only the procedure | b36_over_procedure.eve |
| b37 | b37_param_order | a mandatory parameter may follow optional ones, and the call then names it | b37_param_order.eve |
| b38 | b38_named_required | a parameter after optional parameters can't be positional: the call must name it | b38_named_required.eve |
| b39 | b39_vararg_function | a vararg collects the rest of the arguments; an optional parameter after it is named | b39_vararg_function.eve |
| b40 | b40_procedure_in_expression | a procedure has no value: it can't be used in an expression | b40_procedure_in_expression.eve |
| b41 | b41_variant_params | a variant type holds one of the listed types and takes the type of the value assigned (from demo/variant_type.eve and demo/variant_params.eve) | b41_variant_params.eve |
| b42 | b42_defer_procedure | defer in a procedure runs when the procedure ends, by any path, in reverse order | b42_defer_procedure.eve |
| b43 | b43_vararg_procedure | a vararg parameter collects the arguments of a procedure; * spreads a list into it | b43_vararg_procedure.eve |
| b44 | b44_lambda_call | a lambda is not called where it is written: it gets a name, then the name is called | b44_lambda_call.eve |
| b45 | b45_primary_not_applied | no aspect applies a primary aspect: it is run by a command | b45_primary_not_applied.eve |
| b46 | b46_three_levels | an aspect calls an aspect that calls a third one: three levels | b46_three_levels.eve |
| b47 | b47_aspect_cycle | a chain of calls that comes back to an aspect is a compile error | b47_aspect_cycle.eve |
| b48 | b48_aspect_self_call | an aspect can't call itself | b48_aspect_self_call.eve |
| b49 | b49_four_levels | the chain of calls is at most three levels deep | b49_four_levels.eve |
| b50 | b50_private_process | a private process is applied by its bare name, in the aspect that declares it | b50_private_process.eve |
| b51 | b51_private_process_state | the private processes of a call share the state of the aspect | b51_private_process_state.eve |
| b52 | b52_dot_on_aspect | the dot is never applied to an aspect: only main is public | b52_dot_on_aspect.eve |
| b53 | b53_no_main | an aspect without a process main can't be applied | b53_no_main.eve |
| b54 | b54_run_exclusive | a command runs an exclusive aspect alone, for testing | b54_run_exclusive.eve |
| b55 | b55_function_recover | a function and a procedure can have a recover region: the error is handled inside, the caller goes on | b55_function_recover.eve |
| b56 | b56_recover_result | when recover ends, the function returns its result variables as they are: the zero value if recover sets nothing | b56_recover_result.eve |
| b57 | b57_recover_propagates | an error raised in recover goes to the caller; abort passes the same error on; the caller's recover sees it | b57_recover_propagates.eve |
| b58 | b58_recover_retry_refused | retry and resume need a failed job: in the recover of a function they are a run-time error | b58_recover_retry_refused.eve |
| b59 | b59_generator_no_recover | a generator has no recover region: it is a compile error | b59_generator_no_recover.eve |
| b60 | b60_cfg_setup | -e file.cfg sets system variables: lines $name = literal, # comments, an Integer, a Real, a Logic and a String | b60_cfg_setup.eve |
| b61 | b61_cfg_bad_line | a configuration file with a bad line stops the run before it starts: exit 65 and the line | b61_cfg_bad_line.eve |
| b62 | b62_cfg_setup_command | the REPL command setup checks a configuration file and keeps it for the next runs; a missing file is reported | b62_cfg_setup_command.eve |
Level 3: Modules
Modules and classes, 129 tests. The folder on GitHub.
| Code | Test | What it checks | Source |
|---|---|---|---|
| c01 | c01_import_module | Import a module with an unquoted path; members are reached as module.member | c01_import_module.eve |
| c01 | c01_test1 (variation) | variation 1 of c01: the same module, another use case: only the constant, no call | c01_test1.eve |
| c01 | c01_test2 (variation) | variation 2 of c01: the same module under an alias, called in a loop | c01_test2.eve |
| c02 | c02_import_string_path | Import with a path written as a string | c02_import_string_path.eve |
| c02 | c02_test1 (variation) | variation 1 of c02: a string path and the members without prefix | c02_test1.eve |
| c03 | c03_import_alias | use (m as x): members are reached through the alias | c03_import_alias.eve |
| c03 | c03_test1 (variation) | variation 1 of c03: the same module without a prefix | c03_test1.eve |
| c04 | c04_import_members | use (m(*)): the exported members of m are used without prefix | c04_import_members.eve |
| c04 | c04_test1 (variation) | variation 1 of c04: the same module with its name as prefix | c04_test1.eve |
| c05 | c05_import_all | use (*): every module of the folder, names merged into the scope | c05_import_all.eve |
| c05 | c05_test1 (variation) | variation 1 of c05: the two modules one by one, each with its prefix | c05_test1.eve |
| c06 | c06_module_lifecycle | initialize runs at the import, finalize after the process of the primary aspect | c06_module_lifecycle.eve |
| c06 | c06_test1 (variation) | variation 1 of c06: a module that is imported and never called | c06_test1.eve |
| c07 | c07_module_singleton | a module is loaded once: the primary aspect and an aspect share the same copy | c07_module_singleton.eve |
| c07 | c07_test1 (variation) | variation 1 of c07: the aspect applied twice shares the same module | c07_test1.eve |
| c08 | c08_module_private | a member that a module does not export can't be used outside it ( b) | c08_module_private.eve |
| c08 | c08_test1 (variation) | variation 1 of c08: the exported members only | c08_test1.eve |
| c09 | c09_extension_method | an extension method: a method with @self of a class, declared outside the class | c09_extension_method.eve |
| c09 | c09_test1 (variation) | variation 1 of c09: another extension of the imported class | c09_test1.eve |
| c100 | c100_data_quality | data.quality: nulls, completeness, the profile of a column, duplicates and outliers | c100_data_quality.eve |
| c101 | c101_data_infer | data.infer: the cells of CSV text, the type of a cell and the columns of a table with their types | c101_data_infer.eve |
| c102 | c102_data_stream | data.stream: generators that map, filter, take, drop, chain, number, slide over and merge a source one value at a time; an infinite source is read only as far as needed | c102_data_stream.eve |
| c103 | c103_ids_hash | crypto.crc32 and crypto.fnv1a: checksums of the bytes of a text (values of the standard check string 123456789) | c103_ids_hash.eve |
| c104 | c104_ids_base32 | ids.base32: bytes as base32 text (the alphabet of Crockford) and back | c104_ids_base32.eve |
| c105 | c105_ids_ulid | ids.ulid: ULID from an instant and bytes, its time, the short text of a UUID, and ids picked from bytes; the ids made from the clock and the random bytes are tested by their shape | c105_ids_ulid.eve |
| c106 | c106_ids_check | ids.check: the Luhn digit, the ISBN-13 and the IBAN | c106_ids_check.eve |
| c107 | c107_doc_library | eve doc writes a Markdown page for every module of a library folder, from the ** comments and the signatures | c107_doc_library.eve |
| c10 | c10_class | class with a constructor, methods, visibility, reference and clone | c10_class.eve |
| c11 | c11_extension_method_local | an extension method: declared outside the class, first parameter @self with the class type | c11_extension_method_local.eve |
| c12 | c12_inheritance | a subclass builds its object through the constructor of its superclass | c12_inheritance.eve |
| c13 | c13_visibility | a private member is seen only inside its class | c13_visibility.eve |
| c14 | c14_attribute_outside | code outside a class can't add an attribute to an object | c14_attribute_outside.eve |
| c15 | c15_procedure_in_class | a class hosts only methods: a procedure in a class body is a compile error | c15_procedure_in_class.eve |
| c16 | c16_function_self | a function or a procedure can't be bound to a class with @self: only a method can | c16_function_self.eve |
| c17 | c17_function_in_class | a class hosts only methods: a function in a class body is a compile error | c17_function_in_class.eve |
| c18 | c18_module_conflict | use (m(*)) merges the names: two modules that export the same name: the first import wins, the second is hidden, with a warning | c18_module_conflict.eve |
| c18 | c18_test1 (variation) | variation 1 of c18: the right way: the two modules by name | c18_test1.eve |
| c19 | c19_export_variable | a module has no public variables: exporting one is a compile error | c19_export_variable.eve |
| c20 | c20_export_undeclared | export lists declared members only: an undeclared name is a compile error (proposed) | c20_export_undeclared.eve |
| c21 | c21_module_instance | a module is not a class: it has no instances | c21_module_instance.eve |
| c22 | c22_module_init_order | dependencies are initialized first, and finalized last: the reverse order of the initialization | c22_module_init_order.eve |
| c22 | c22_test1 (variation) | variation 1 of c22: only the module with no import | c22_test1.eve |
| c22 | c22_test2 (variation) | variation 2 of c22: both modules, the dependent one first in the list | c22_test2.eve |
| c23 | c23_module_free_statement | a module holds declarations and regions only: a free statement is a compile error | c23_module_free_statement.eve |
| c24 | c24_import_aspect | an aspect can't be imported: only a module can | c24_import_aspect.eve |
| c25 | c25_module_not_found | a module that is not found is the error $err_module (code 30), raised at the import, before the process starts | c25_module_not_found.eve |
| c26 | c26_managed_module_variable | a managed module is rejected when it has a variable that is not atomic | c26_managed_module_variable.eve |
| c27 | c27_managed_module_direct_call | a managed module that calls a direct module is rejected | c27_managed_module_direct_call.eve |
| c28 | c28_managed_module | a managed module is accepted: no variable, no unsafe call | c28_managed_module.eve |
| c28 | c28_test1 (variation) | variation 1 of c28: a managed module under an alias | c28_test1.eve |
| c29 | c29_external_signature | a module may declare external functions and procedures (no body), exported by name, even a reserved word like write | c29_external_signature.eve |
| c29 | c29_managed_module_atomic | a managed module is accepted when every variable is Atomic(:T) | c29_managed_module_atomic.eve |
| c29 | c29_test1 (variation) | variation 1 of c29: the atomic counter, many times | c29_test1.eve |
| c30 | c30_atomic_class | class Name <: Atomic(:T) declares an atomic type | c30_atomic_class.eve |
| c30 | c30_test1 (variation) | variation 1 of c30: a type derived from Atomic, used ten times | c30_test1.eve |
| c30 | c30_external_with_body | an external routine has no body: giving one is a compile error | c30_external_with_body.eve |
| c31 | c31_atomic_variable | Atomic(:T) is a library class: a variable is declared:Atomic(:Integer) and used like an Integer | c31_atomic_variable.eve |
| c31 | c31_external_call | calling an external of a user module that the machine does not implement is a run-time error with a clear message | c31_external_call.eve |
| c32 | c32_module_path_spelling | the same module reached by two spellings of the path is one module: loaded once, one state | c32_module_path_spelling.eve |
| c33 | c33_managed_bare_call | a managed module can not call a direct module, also by a bare name from m(*) | c33_managed_bare_call.eve |
| c33 | c33_test1 (variation) | variation 1 of c33: the bare name of a managed module is accepted | c33_test1.eve |
| c34 | c34_module_recover | an exported function or procedure of a module can have a recover region; it handles the error before the importer sees it | c34_module_recover.eve |
| c35 | c35_method_recover | a method can have a recover region; it sees self and its own variables | c35_method_recover.eve |
| c36 | c36_constructor_no_recover | a constructor has no recover region: it is a compile error | c36_constructor_no_recover.eve |
| c37 | c37_error_in_module | an error raised in a module names the file of the module, not the script that called it (G-1) | c37_error_in_module.eve |
| c38 | c38_external_native | an external of a module is bound to the native of the machine with the same module and name (G-3, TD-2) | c38_external_native.eve |
| c39 | c39_project_data | a project reads its input from data/in through $EVE_HOME and writes its output to data/out (project-layout.md) | c39_project_data.eve |
| c39 | c39_property_method_same_name | a property and a method of one class may not share a name (CLS-13) | c39_property_method_same_name.eve |
| c40 | c40_private_attribute_needs_constructor | a private attribute needs a constructor in the same class (CLS-17b) | c40_private_attribute_needs_constructor.eve |
| c41 | c41_destructor | a destructor runs when the last reference goes away, newest first, once; an error in it is dropped (CLS-14) | c41_destructor.eve |
| c42 | c42_class_constant | set in the body of a class defines a constant, initialized once when the class is declared, read as Class.NAME (CLS-17b) | c42_class_constant.eve |
| c43 | c43_module_reexport | from sub export (*): the parent module re-exports the exported names of a submodule of its folder | c43_module_reexport.eve |
| c43 | c43_test1 (variation) | variation 1 of c43: a name that the parent lists but the submodule does not export is a compile error | c43_test1.eve |
| c44 | c44_import_alias_all | use (*) alias x: every module of the folder merged under one prefix | c44_import_alias_all.eve |
| c44 | c44_test1 (variation) | variation 1 of c44: two modules of the folder export the same name: the first (by file name) wins, the second is hidden, with a warning | c44_test1.eve |
| c45 | c45_import_default_name | use (*) gives bare names and also the folder name as a prefix: from lib/shapes use (*) -> shapes.name | c45_import_default_name.eve |
| c45 | c45_test1 (variation) | variation 1 of c45: the submodules of a parent module are members of it: shapes.sides.square_sides() | c45_test1.eve |
| c46 | c46_rational_literal | the type Rational: the literal 3\4, lowest terms, sign, printing, type, zero value, equality | c46_rational_literal.eve |
| c47 | c47_rational_arithmetic | the type Rational: exact + - * / ^, mixing with Integer and Real, comparison, compound assignment, errors | c47_rational_arithmetic.eve |
| c47 | c47_test1 (variation) | variation 1 of c47: a Rational and a Decimal are never mixed: a compile error, exit 65 | c47_test1.eve |
| c47 | c47_test2 (variation) | variation 2 of c47: Rationals in collections: sort, min, max, sum, unique, contains, index_of, map and filter | c47_test2.eve |
| c48 | c48_rational_library | library math, module rational: of, numerator, denominator, reciprocal, truncate, is_whole, to_real, from_real, parse, mediant, continued | c48_rational_library.eve |
| c49 | c49_rational_stress | the type Rational under load: laws on a grid, Farey sequences, harmonic numbers to the overflow, Bernoulli numbers, continued fractions, sorting; the expected values come from Python's fractions | c49_rational_stress.eve |
| c50 | c50_complex_literal | the type Complex: the imaginary literal i99, a complex number as a sum in parentheses, equality, printing, type, zero value | c50_complex_literal.eve |
| c51 | c51_complex_arithmetic | the type Complex: + - * / ^ with Complex, Integer, Real and Rational; no order; errors. Expected values from Python's complex numbers | c51_complex_arithmetic.eve |
| c51 | c51_test1 (variation) | variation of c51: a Complex has no order: a compile error, exit 65 | c51_test1.eve |
| c51 | c51_test2 (variation) | variation of c51: a Complex and a Decimal are never mixed: a compile error, exit 65 | c51_test2.eve |
| c52 | c52_complex_library | library math, module complex: of, real_part, imag_part, modulus, argument, conjugate, from_polar, exp, log, sqrt, pow, is_real; abs of a Complex. Expected values from Python's cmath | c52_complex_library.eve |
| c53 | c53_complex_stress | the type Complex under load: a Mandelbrot grid, roots of unity, a discrete Fourier transform, De Moivre, Gaussian integers; the totals come from Python's complex numbers | c53_complex_stress.eve |
| c60 | c60_repl_session | the prompt runs Eve lines in one session scope: a variable of one line is seen by the next, an expression is printed, an error does not end the session (F-TLS-03) | c60_repl_session.eve |
| c61 | c61_error_classes | the run-time errors have classes: $error is DivideError, $error is Error (every error), SqlError <: DatabaseError; error_type(code) gives the class of a code (errors.md#error-classes) | c61_error_classes.eve |
| c62 | c62_error_construct | Error(code, message) and the class of a code make an error object to raise; warn(code, message) writes a warning line on the standard error and goes on (errors.md#error-classes) | c62_error_construct.eve |
| c63 | c63_stats_describe | stats.describe: mean, median, mode(s), variance and standard deviation (sample and population), quantile, range, skew, kurtosis, describe; errors are $err_argument | c63_stats_describe.eve |
| c64 | c64_stats_correlate | stats.covariance, pearson, spearman and ranks; lists of different length or equal numbers are $err_argument | c64_stats_correlate.eve |
| c65 | c65_stats_regress | stats.regress.linear gives slope, intercept and r2; stats.regress.poly the coefficients of a polynomial, lowest power first | c65_stats_regress.eve |
| c66 | c66_stats_distrib | stats.distrib: the normal, binomial, Poisson and uniform distributions; a bad parameter is $err_argument | c66_stats_distrib.eve |
| c67 | c67_stats_sample | stats.sample.draw with and without replacement and stats.sample.bootstrap; the same seed gives the same sample; a bad size is $err_argument | c67_stats_sample.eve |
| c68 | c68_stats_histogram | stats.histogram.bins: equal-width bins from the smallest to the largest number, the last bin closed on the right | c68_stats_histogram.eve |
| c69 | c69_stats_moving | stats.moving.simple has null for the first n - 1 items; stats.moving.exponential starts with the first number | c69_stats_moving.eve |
| c70 | c70_expect_message | expect and assert take a message: expect cond else "text"; and expect cond, "text"; it is the message of the error (errors.md#expect-and-assert) | c70_expect_message.eve |
| c71 | c71_error_class_code | a program defines its own errors as classes below Error with a code from 1000 up; raise gives the code, the message and the fields to recover; a class below such a class keeps the code (errors.md#errors-of-a-program) | c71_error_class_code.eve |
| c72 | c72_error_code_reserved | the codes below 1000 are the compiler's and the standard library's: an error class of a program with one is a compile error | c72_error_code_reserved.eve |
| c73 | c73_error_class_no_code | a class below Error needs a code of its own or of a parent of the program | c73_error_class_no_code.eve |
| c74 | c74_raise_unknown_code | raise (code, text) takes a standard code or the code of a class of the program: another number is a compile error | c74_raise_unknown_code.eve |
| c75 | c75_error_constructor_code | Error(code, text) takes a standard code too; the code of a class of the program is made by the class | c75_error_constructor_code.eve |
| c76 | c76_calendar_period | calendar.period: the quarter, week, year and fiscal year of a date | c76_calendar_period.eve |
| c77 | c77_calendar_holidays | calendar.holidays: Easter of both churches, the holidays of a country in a year, the name of a day; an unknown calendar is $err_argument | c77_calendar_holidays.eve |
| c78 | c78_calendar_business | calendar.business: business days with and without the holidays of a calendar | c78_calendar_business.eve |
| c79 | c79_text_encode | text.encode: hexadecimal, Base64, Base64 for URLs and percent encoding of a String, and back; a bad percent code is $err_argument | c79_text_encode.eve |
| c80 | c80_text_slug | text.slug: the letters with marks written plainly and the slug of a text | c80_text_slug.eve |
| c81 | c81_text_template | text.template: a text with holes that a map fills; two braces are one brace; a missing value is $err_key, a bad hole $err_argument | c81_text_template.eve |
| c82 | c82_text_diff | text.diff: the lines that were kept, removed and added, and the same as text | c82_text_diff.eve |
| c83 | c83_text_regex | text.regex: is_match, matches, find, find_all, replace and split with the regex literal form /pattern/flags; the operator =~ uses the same engine; a bad pattern is $err_argument | c83_text_regex.eve |
| c84 | c84_text_unicode | text.unicode: the canonical composition of a text and its width on a terminal | c84_text_unicode.eve |
| c85 | c85_finance_decimal | Decimal.round(scale, mode), scale(), units(), Decimal.of(units, scale) and Decimal.parse: the rounding modes of money | c85_finance_decimal.eve |
| c86 | c86_finance_money | finance.money: the digits of a currency from the meta database, rounding of an amount by a named rule, minor units, and sharing an amount without losing a unit | c86_finance_money.eve |
| c87 | c87_finance_percent | finance.percent: change, share, markup and margin in percent, and an amount of money raised or cut by a percentage | c87_finance_percent.eve |
| c88 | c88_finance_interest | finance.interest: simple and compound interest, present and future value, effective and nominal rates; the Reals are shown in micro-units | c88_finance_interest.eve |
| c89 | c89_finance_loan | finance.loan: the payment of an annuity loan and its schedule in money; the last payment clears the balance | c89_finance_loan.eve |
| c90 | c90_finance_invest | finance.invest: net present value, internal rate of return and payback of cash flows | c90_finance_invest.eve |
| c91 | c91_finance_tax | finance.tax: a tax by brackets and VAT on a price | c91_finance_tax.eve |
| c92 | c92_finance_depreciation | finance.depreciation: straight line, declining balance and sum of the years' digits | c92_finance_depreciation.eve |
| c93 | c93_finance_invoice | finance.invoice: the net of a line and the totals of an invoice, with the tax rounded for each line or once for the whole invoice | c93_finance_invoice.eve |
| c94 | c94_eng_constants | eng.constants: the constants of physics in SI units (CODATA 2018) | c94_eng_constants.eve |
| c95 | c95_eng_units | eng.units: conversion between the units of a dimension, temperatures with their offsets, and checked arithmetic on quantities | c95_eng_units.eve |
| c96 | c96_eng_numeric | eng.numeric: roots, integrals, differential equations and interpolation; the Reals are shown rounded | c96_eng_numeric.eve |
| c97 | c97_eng_signal | eng.signal: convolution, the discrete Fourier transform and its inverse, magnitudes and frequencies | c97_eng_signal.eve |
| c98 | c98_eng_geometry | eng.geometry: points, polygons, triangles, circles, the convex hull and the crossing of two segments | c98_eng_geometry.eve |
| c99 | c99_data_rows | data.rows: groups, counts, sums, joins, pivots, duplicates, top rows, windows and the filling of nulls over lists of records | c99_data_rows.eve |
Level 4: Parallel
Parallel processing, 62 tests. The folder on GitHub.
| Code | Test | What it checks | Source |
|---|---|---|---|
| d01 | d01_concurrent_direct_call | the compiler flags the call of a direct module from a concurrent aspect | d01_concurrent_direct_call.eve |
| d02 | d02_concurrent_managed_call | a concurrent aspect calls a managed module | d02_concurrent_managed_call.eve |
| d02 | d02_test1 (variation) | variation 1 of d02: the concurrent aspect with another input | d02_test1.eve |
| d03 | d03_concurrent_bare_call | a concurrent aspect can not call an unsafe member, also by a bare name from m(*) | d03_concurrent_bare_call.eve |
| d04 | d04_parallel_group | two parallel groups run one after the other; the output of a group is in the order of start | d04_parallel_group.eve |
| d05 | d05_parallel_outputs | each started aspect writes its own element of an array; the results are ready after done | d05_parallel_outputs.eve |
| d05 | d05_test1 (variation) | variation 1 of d05: start inside if, inputs by value, a declaration local to the group | d05_test1.eve |
| d06 | d06_start_exclusive | start of an aspect without a kind word is a compile error: it is exclusive | d06_start_exclusive.eve |
| d07 | d07_start_outside_group | start outside the do region of a parallel group is a compile error | d07_start_outside_group.eve |
| d08 | d08_same_output | two starts of a group can not receive the same output variable ($err_output) | d08_same_output.eve |
| d08 | d08_test1 (variation) | variation 1 of d08: an output with a computed index is checked at start: $err_output 43 | d08_test1.eve |
| d09 | d09_parallel_error | failed tasks do not stop the others; done raises ParallelError with the errors in the order of start | d09_parallel_error.eve |
| d09 | d09_test1 (variation) | variation 1 of d09: nobody recovers the ParallelError: exit 4, one line per failed task | d09_test1.eve |
| d09 | d09_test2 (variation) | variation 2 of d09: retry in recover runs the whole group again | d09_test2.eve |
| d10 | d10_on_error_cancel | on error cancel stops the other tasks after the first failure; they are counted, not listed | d10_on_error_cancel.eve |
| d11 | d11_within_timeout | within sets a deadline: a task still running gets a TimeoutError | d11_within_timeout.eve |
| d12 | d12_channel_pipeline | a pipeline: one producer, four workers and a collector connected by two channels | d12_channel_pipeline.eve |
| d13 | d13_channel_closed | send into a closed channel raises ChannelError, code 46 | d13_channel_closed.eve |
| d14 | d14_deadlock | a consumer that waits on a channel nobody sends to is a deadlock; the error names it | d14_deadlock.eve |
| d15 | d15_atomic_counter | eight tasks add to an Atomic(:Integer) of a managed module: the total is exact | d15_atomic_counter.eve |
| d16 | d16_split_batch | split(k) and batch(n) cut a list; the parts are summed in parallel and combined by index | d16_split_batch.eve |
| d17 | d17_job_spawn | spawn starts async procedures in a job, await waits for an async function; done waits for every task | d17_job_spawn.eve |
| d18 | d18_spawn_function | spawn of an async function is a compile error: its result would be lost | d18_spawn_function.eve |
| d19 | d19_async_plain_call | an async procedure called without spawn or await is a compile error ( b) | d19_async_plain_call.eve |
| d20 | d20_trait | a class adopts a trait: it writes the required method and gets the provided one | d20_trait.eve |
| d21 | d21_trait_missing_method | a class that does not write a required method of its trait is a compile error | d21_trait_missing_method.eve |
| d22 | d22_abstract_class | an abstract class is built only by the constructor of a subclass that writes its required method | d22_abstract_class.eve |
| d23 | d23_abstract_new | an abstract class can not be created outside the constructor of a subclass | d23_abstract_new.eve |
| d24 | d24_generic_class | a generic class is made with its type argument written; a constraint asks for a trait | d24_generic_class.eve |
| d25 | d25_nested_group | the primary aspect opens a group of concurrent aspects; outputs keep the order of start (D-206: only the primary aspect fans out) | d25_nested_group.eve |
| d26 | d26_nested_too_many | an exclusive aspect starts nothing in parallel: a start in it is a compile error, the limit of two starts of D-140 is gone | d26_nested_too_many.eve |
| d27 | d27_start_order | the output of a group is written in the order of start, whatever task ends first | d27_start_order.eve |
| d28 | d28_channel_receive | receive(@x) takes one value; a for loop takes the rest until the channel is closed | d28_channel_receive.eve |
| d28 | d28_test1 (variation) | variation 1 of d28: receive from a closed, empty channel raises ChannelError 46 | d28_test1.eve |
| d28 | d28_test2 (variation) | variation 2 of d28: a close beyond the number of senders is an error | d28_test2.eve |
| d29 | d29_auto_close | a failing producer does not close its channel: the machine closes it, so the consumer ends | d29_auto_close.eve |
| d30 | d30_channel_timeout | a wait on a channel longer than $timeout raises TimeoutError in that task | d30_channel_timeout.eve |
| d31 | d31_leaf_group | a concurrent aspect may open a group that starts its own private processes; the primary aspect calls it | d31_leaf_group.eve |
| d32 | d32_parallel_in_procedure | a parallel group in a procedure is a compile error: only in the main of a primary aspect or of an aspect | d32_parallel_in_procedure.eve |
| d33 | d33_job_spawn_error | a failing spawned task does not stop the others; the done of the job raises ParallelError | d33_job_spawn_error.eve |
| d34 | d34_trait_conflict | two traits that provide the same method force the class to write it | d34_trait_conflict.eve |
| d35 | d35_library_traits | a Printable object prints its describe; Comparable gives compare to numbers and texts | d35_library_traits.eve |
| d36 | d36_private_start_atomic | a concurrent aspect starts its own private processes; they add to an atomic variable | d36_private_start_atomic.eve |
| d37 | d37_private_start_plain | a started private process uses only the thread-safe names of its aspect | d37_private_start_plain.eve |
| d38 | d38_primary_start_private | a primary aspect is serial: it applies its private processes, it does not start them | d38_primary_start_private.eve |
| d39 | d39_concurrent_by_command | a command does not run a concurrent aspect: it is called from a primary or an exclusive aspect | d39_concurrent_by_command.eve |
| d40 | d40_concurrent_calls_concurrent | a concurrent aspect does not call another concurrent aspect | d40_concurrent_calls_concurrent.eve |
| d41 | d41_generic_class_two_params | a generic class takes several type parameters, written in the same list (CLS-09) | d41_generic_class_two_params.eve |
| d42 | d42_adopt_trait | a type adopts a trait outside its declaration: adopt Trait for Type is... end adopt; (CLS-15) | d42_adopt_trait.eve |
| d43 | d43_adopt_missing_method | an adopt block must write every method that the trait requires (CLS-15) | d43_adopt_missing_method.eve |
| d44 | d44_generic_inferred_constraint | a call without a type list is checked against the constraint too: a list of Points given to largest(:T <: Comparable) is a compile error | d44_generic_inferred_constraint.eve |
| d45 | d45_generic_class_constraint | the type argument of a generic class must adopt the constraint of its parameter: Sorted(:Point) is a compile error | d45_generic_class_constraint.eve |
| d46 | d46_fmt_command | eve fmt --check reports a file whose layout would change (trailing white space, blank lines in a row, more than one line ending at the end) and exits 1; a file in layout exits 0 (lexical.md#layout) | d46_fmt_command.eve |
| d46 | d46_test1 (variation) | variation of d46: a file in layout is left alone (exit 0) | d46_test1.eve |
| d47 | d47_lint_command | eve lint reports the variables, parameters, loop variables and imports that are declared and never used; a name that starts with _ is meant to be unused; exit 1 when there are warnings | d47_lint_command.eve |
| d48 | d48_exclusive_calls_concurrent | an exclusive aspect does not apply a concurrent aspect: only the primary aspect calls one (D-206) | d48_exclusive_calls_concurrent.eve |
| d49 | d49_max_parallel | $cores is the number of hardware cores (1 to 16) and $max_parallel the tasks of a group that run at a time (default 8): a start beyond it waits until a task of the group has ended | d49_max_parallel.eve |
| d50 | d50_atomic_heavy | four tasks add 50,000 times each to an Atomic(:Integer) of a managed module: the total is exact whatever the number of cores | d50_atomic_heavy.eve |
| d51 | d51_channel_copy | a list sent through a channel is copied: the sender and the receiver each change their own copy | d51_channel_copy.eve |
| d52 | d52_output_copy | an input is a copy, an output is copied back at done: the parent and the task never share a list | d52_output_copy.eve |
| d53 | d53_task_garbage | six tasks make and drop many lists and texts: each task frees its own garbage while it runs, and the sums are exact | d53_task_garbage.eve |
| d54 | d54_db_tasks | four tasks query the same database connection: the connection is one for the run and the tasks take turns, so every answer is complete | d54_db_tasks.eve |
Level 5: Data
Data and database, 203 tests. The folder on GitHub.
| Code | Test | What it checks | Source |
|---|---|---|---|
| e01 | e01_generic_function | a generic function has a list of types before its parameters; the call infers the types or writes them | e01_generic_function.eve |
| e02 | e02_generic_procedure | a generic procedure takes a list of types; the call infers it or writes it | e02_generic_procedure.eve |
| e03 | e03_generic_method | a method has its own list of types, in a generic class or in a plain class | e03_generic_method.eve |
| e04 | e04_generic_process | the process of an aspect takes a list of types; apply infers it or writes it; one Eve macro | e04_generic_process.eve |
| e05 | e05_overload_types | functions and procedures share a name when the types of their parameters differ | e05_overload_types.eve |
| e06 | e06_overload_count | functions and procedures share a name when the number of their parameters differs | e06_overload_count.eve |
| e07 | e07_overload_result | functions that differ only by the type of the result: the type expected at the call selects one | e07_overload_result.eve |
| e08 | e08_overload_ambiguous | a call that does not fix the type of the result of an overloaded function is ambiguous: compile error | e08_overload_ambiguous.eve |
| e09 | e09_overload_defaults | a default value can make two signatures match the same call: compile error | e09_overload_defaults.eve |
| e100 | e100_sql_function_type | the parameters and the result of a sql function have SQL types: a List is refused | e100_sql_function_type.eve |
| e101 | e101_sql_function_overload | a sql function can not be overloaded: SQL finds a function by its name | e101_sql_function_overload.eve |
| e102 | e102_proc_module | Eve stored procedures: a module of proc/ is imported like any module; its sql function is registered on the connection | e102_proc_module.eve |
| e102 | e102_test1 (variation) | eve db proc list: the modules of proc/ with the hash of their source, and their exported procedures with signatures | e102_test1.eve |
| e103 | e103_secret_join | a Secret is not a String: joining it to a text with + is a compile error (data-language.md#secrets) | e103_secret_join.eve |
| e104 | e104_yield_in_nested_function | yield in a function declared inside a generator is a compile error: only the body of the generator itself yields | e104_yield_in_nested_function.eve |
| e105 | e105_decimal_real_convert | Decimal and Real are converted explicitly: d.real(), r.decimal(), or by:= to a variable or a type hint of the other kind | e105_decimal_real_convert.eve |
| e106 | e106_print_null | null is the value and Null its type: print writes null, type() gives Null | e106_print_null.eve |
| e107 | e107_time_now_bang | the clock is not deterministic: its name ends with !, time.now!(); time.now() is refused | e107_time_now_bang.eve |
| e108 | e108_macro_primary_pipeline | a macro: the primary aspect applies a concurrent aspect that starts its own private processes | e108_macro_primary_pipeline.eve |
| e109 | e109_macro_primary_applied | in a macro, no aspect applies the primary aspect | e109_macro_primary_applied.eve |
| e10 | e10_overload_no_match | a call that matches no signature of an overloaded name is a compile error | e10_overload_no_match.eve |
| e110 | e110_connection_import | import: a method of the connection that loads a file (CSV, TXT, JSON or DBF) as a new table | e110_connection_import.eve |
| e111 | e111_memory_table | Memory: a class derived from Memory is a columnar table; a column is named by its field; load and store move data | e111_memory_table.eve |
| e11 | e11_function_procedure_name | a function and a procedure never share a name: compile error | e11_function_procedure_name.eve |
| e120 | e120_duration_literal | the type Duration: the literals 5us 250ms 30s 2m 1h, equality and order, the ISO text, the zero value, a list of durations | e120_duration_literal.eve |
| e121 | e121_duration_arithmetic | the type Duration: + - * / with Duration and Integer, Instant plus and minus a Duration, Instant minus Instant, errors | e121_duration_arithmetic.eve |
| e121 | e121_test1 (variation) | variation of e101: a Duration plus a plain number is a compile error, exit 65 | e121_test1.eve |
| e121 | e121_test2 (variation) | variation of e101: a number minus a Duration is a compile error, exit 65 | e121_test2.eve |
| e121 | e121_test3 (variation) | variation of e101: a Duration times a Real is a compile error, exit 65 | e121_test3.eve |
| e122 | e122_time_module | the module time: now!, seconds, millis, micros, sleep; Duration.parse; wait and within accept a Duration (and the old integer of milliseconds) | e122_time_module.eve |
| e123 | e123_date_basics | the types Date and Time: made by functions, fields, text, parse, zero value, comparison, errors | e123_date_basics.eve |
| e124 | e124_date_arithmetic | Date and Time: + - with days and Durations, the clock that wraps, add_months, add_years, start_of, months_between, sorting | e124_date_arithmetic.eve |
| e124 | e124_test1 (variation) | variation of e124: two Dates cannot be added: a compile error, exit 65 | e124_test1.eve |
| e124 | e124_test2 (variation) | variation of e124: a Date and a Time are not compared: a compile error, exit 65 | e124_test2.eve |
| e124 | e124_test3 (variation) | variation of e124: a Time plus a plain number: a compile error, exit 65 | e124_test3.eve |
| e124 | e124_test4 (variation) | variation of e124: a Date times a number: a compile error, exit 65 | e124_test4.eve |
| e125 | e125_date_table | Date: 220 dates against Python's datetime: weekday, day of year, ISO week and year, add_months, add_years, start_of, end_of_month, months_between, the day count | e125_date_table.eve |
| e126 | e126_date_io | Date, Time and Duration fields: written and read back by csv and json, canonical text, a bad value is a read error | e126_date_io.eve |
| e127 | e127_time_patterns | time.format and time.parse: the letters, quoted text, the placeholders {d % pattern}, the typed Date.parse(text, pattern), and the errors | e127_time_patterns.eve |
| e128 | e128_time_pattern_table | time.format against Python for 160 instants and six patterns, and the round trip parse(format(x)) for the patterns that keep every field | e128_time_pattern_table.eve |
| e129 | e129_meta_zone | the library zone over the meta database: exists, canonical, offset, abbreviation, is_dst, names; the entries of meta.info; errors | e129_meta_zone.eve |
| e12 | e12_same_signature | two declarations with the same signature are a compile error | e12_same_signature.eve |
| e130 | e130_meta_zone_table | the zones of the meta database against Python's zoneinfo (the same tzdata release): 32 zones, 140 instants each, from 1840 to 2105, with the offset and the abbreviation | e130_meta_zone_table.eve |
| e131 | e131_meta_zone_bulk | the zones of the meta database against Python's zoneinfo (the time limit is 120 s: the zone door is Eve code, 30 times slower than the former native code, TD-91) for 240000 instants (1900 to 2100): the sum of the offsets of 20000 instants in each of 12 zones | e131_meta_zone_bulk.eve |
| e132 | e132_meta_sql | the meta database as a read only SQL database: database.connect("meta") needs no eve.cfg; joins with the tables of the user's own data; a write is refused | e132_meta_sql.eve |
| e133 | e133_datetime_basics | the types Zone and DateTime: time.zone, at_zone, make (a gap, a time shown twice), the fields, + and - with a Duration, equality across zones, add_months and start_of in a zone, the zero values | e133_datetime_basics.eve |
| e133 | e133_test1 (variation) | variation of e133: a DateTime plus a plain number: a compile error, exit 65 | e133_test1.eve |
| e133 | e133_test2 (variation) | variation of e133: two DateTimes cannot be added: a compile error, exit 65 | e133_test2.eve |
| e133 | e133_test3 (variation) | variation of e133: a Zone has no arithmetic: a compile error, exit 65 | e133_test3.eve |
| e133 | e133_test4 (variation) | variation of e133: a DateTime and a Date are not compared: a compile error, exit 65 | e133_test4.eve |
| e134 | e134_datetime_patterns | DateTime: the letters X, VV and z, a zone in parse, DateTime.parse of the ISO forms, Zone.parse, the placeholders, the errors | e134_datetime_patterns.eve |
| e135 | e135_datetime_table | DateTime against Python's zoneinfo: at_zone gives the same wall-clock text for 90 instants in 12 zones (1860 to 2100, the old local mean times, every kind of summer time), and make finds the instant of 60 local times in each zone (the first of two when the clock shows a time twice) | e135_datetime_table.eve |
| e136 | e136_datetime_io | DateTime and Zone fields: written and read back by csv and json in the canonical text (the offset, not the region); a bad value is a read error | e136_datetime_io.eve |
| e137 | e137_local_zone | the zone of the machine and today: whatever the machine is, the answers fit each other | e137_local_zone.eve |
| e138 | e138_meta_schema | the schema of the meta database: continents, countries with a continent, zones with a country; the foreign keys hold and the data fits the sources | e138_meta_schema.eve |
| e139 | e139_bytes_basics | Bytes: made from hex, base64, numbers or text; printed as 0x and hex; indexed from 1; a slice is a copy; the operators compare by content | e139_bytes_basics.eve |
| e13 | e13_method_result_or_not | a method without a result and one with a result share a name: a statement calls the first, an expression the second | e13_method_result_or_not.eve |
| e140 | e140_bytes_errors | Bytes errors: a bad hex digit or base64 character, a value outside 0 to 255, an index outside, a text that is not UTF-8 | e140_bytes_errors.eve |
| e141 | e141_bytes_file | a file read and written as Bytes: the content is kept exactly, any byte values, and hashing text gives the same bytes | e141_bytes_file.eve |
| e142 | e142_uuid_basics | Uuid: parsed from text in any case, with or without hyphens and braces; printed in lower case with hyphens; a version and 16 bytes | e142_uuid_basics.eve |
| e143 | e143_uuid_errors | Uuid errors: a text that is not a Uuid, bytes of another length, the time of a version other than 7, a namespace that is not a Uuid | e143_uuid_errors.eve |
| e144 | e144_uuid_v7_time | a version 7 Uuid carries the time it was made: a later one sorts after an earlier one, and its instant is the moment of the call | e144_uuid_v7_time.eve |
| e145 | e145_optional_default | x ?? d is x when x is not null, else d; it groups to the right, and d is not run when x is not null | e145_optional_default.eve |
| e146 | e146_optional_narrow | a test against null narrows the optional name inside the block: its type is the plain one there; a test with and narrows the right side | e146_optional_narrow.eve |
| e147 | e147_optional_arith_error | a value that may be null is not an operand of + until a test narrows it: compile error | e147_optional_arith_error.eve |
| e148 | e148_optional_method_error | a method called on a value that may be null is a compile error until the value is tested | e148_optional_method_error.eve |
| e149 | e149_optional_scope_error | the narrowing of a test lasts only inside its block: after the block the value may be null again | e149_optional_scope_error.eve |
| e14 | e14_generic_lambda | a lambda has no list of types: compile error | e14_generic_lambda.eve |
| e150 | e150_null_to_plain_error | null is not a value of a plain type: a variable of a plain type can not be given null | e150_null_to_plain_error.eve |
| e151 | e151_fs_glob | fs.glob!: a pattern of names, * and ? inside one segment of a path, sorted by name in the byte order; a folder that does not exist gives no name (data-language.md#files-and-paths) | e151_fs_glob.eve |
| e152 | e152_gzip_readers | the readers of csv, json, txt and fs.lines! decompress a path that ends in .gz; a file that is not gzip is $err_format (data-language.md#compression) | e152_gzip_readers.eve |
| e153 | e153_format_round_trip | records written as CSV and as JSON are read back equal: the same rows, the same values, in the same order (data-language.md#files-and-paths) | e153_format_round_trip.eve |
| e154 | e154_gzip_stream | gzip.open! gives the content of a gzip file as a Stream(:Bytes), in chunks of 64 KiB: the chunks are in order and their lengths add up to the content (data-language.md#compression) | e154_gzip_stream.eve |
| e155 | e155_optimization_level | the optimization level is the command line option -O: the script reads it as $optimization and can not change it | e155_optimization_level.eve |
| e155 | e155_test1 (variation) | without -O the level is 1, the lowest | e155_test1.eve |
| e155 | e155_test2 (variation) | the level is a whole number from 0 to 10: another number is a usage error (exit 64) and the script does not run | e155_test2.eve |
| e155 | e155_test3 (variation) | $optimization is read only in the script: a script can not set the level | e155_test3.eve |
| e155 | e155_test4 (variation) | the level changes the time of a run, never its result: at -O 0 the output and the error are those of every other level | e155_test4.eve |
| e155 | e155_test5 (variation) | the level changes the time of a run, never its result: at -O 10 the output and the error are those of every other level | e155_test5.eve |
| e156 | e156_optimization_zone | the zone functions give the same answers at optimization level 5 (the database is read in the background at the start) and at levels 0 and 1 (read at the first use) | e156_optimization_zone.eve |
| e156 | e156_test1 (variation) | the zone functions give the same answers at optimization level 5 (the database is read in the background at the start) and at levels 0 and 1 (read at the first use) | e156_test1.eve |
| e156 | e156_test2 (variation) | the zone functions give the same answers at optimization level 5 (the database is read in the background at the start) and at levels 0 and 1 (read at the first use) | e156_test2.eve |
| e157 | e157_meta_hints | a hint names the tables of the meta database that the script needs; at optimization level 5 they are copied in the background at the start, and the zone functions give the same answers | e157_meta_hints.eve |
| e157 | e157_test1 (variation) | the same script at the lowest level: the tables are copied at the first use | e157_test1.eve |
| e157 | e157_test2 (variation) | a hint that names a table that does not exist is a compile error, and the script does not run | e157_test2.eve |
| e157 | e157_test3 (variation) | require(*) gives every table, and the SQL door of the meta database reads the release of the zone data | e157_test3.eve |
| e157 | e157_test4 (variation) | no hint: the import of lib/meta gives the tables that its module reads, and the module works at level 5 and at level 0 | e157_test4.eve |
| e158 | e158_meta_rule | the POSIX rule of a zone after its last transition, evaluated in Eve: the local time of a rule at instants of the years after the stored transitions (America/Santiago, Sydney, Dublin, Lord Howe, ...) | e158_meta_rule.eve |
| e159 | e159_hidden_imports | a library module used without an import: the compiler adds the import, as if the script had written it | e159_hidden_imports.eve |
| e159 | e159_test1 (variation) | a variable with the name of a library module is the variable: no import is added for it | e159_test1.eve |
| e159 | e159_test2 (variation) | a name that is not a library module is still an undefined name: a compile error | e159_test2.eve |
| e15 | e15_type_not_inferred | a type that the arguments do not give must be written at the call: compile error | e15_type_not_inferred.eve |
| e160 | e160_static_types | a value of a basic type can not be assigned to a declared variable of another basic type: a compile error before the run (F-LNG-16) | e160_static_types.eve |
| e160 | e160_test1 (variation) | an argument of a basic type does not fit the parameter of another basic type: a compile error before the run (F-LNG-16) | e160_test1.eve |
| e160 | e160_test2 (variation) | a result of a function with another basic type than its declared result: a compile error before the run (F-LNG-16) | e160_test2.eve |
| e160 | e160_test3 (variation) | a declaration with a value of another basic type: a compile error before the run (F-LNG-16) | e160_test3.eve |
| e160 | e160_test4 (variation) | the allowed conversions: numbers of any kind go to numbers, and a String and a Text are the same kind of value | e160_test4.eve |
| e161 | e161_error_classes | an object of a class raised with raise: its code and message are the error, and its own fields are read from $error in recover (F-LNG-15) | e161_error_classes.eve |
| e161 | e161_test1 (variation) | an object of a class raised and not recovered: the process exits with code 4 and the error is printed with its message (F-LNG-15) | e161_test1.eve |
| e162 | e162_zone_spans | the spans of the zones in memory against the Eve code: every day of 1999, 2024 and 2090 at four local times (gaps and repeated hours included) in 20 zones with daylight time and with odd changes; the expected sums were made by the Eve code alone (EVE_ZONE_SLOW=1) | e162_zone_spans.eve |
| e163 | e163_secret_sources | a secret comes from the variable EVE_SECRET_<NAME>, else from the file named by EVE_SECRET_<NAME>_FILE (its last line ending cut); the variable wins; a missing file is $err_file; the value never prints | e163_secret_sources.eve |
| e164 | e164_os_platform | os.platform() is "windows", "linux" or "macos", the same for the whole run (os.md) | e164_os_platform.eve |
| e165 | e165_gzip_write | gzip.write(path, data) writes a String or Bytes as a gzip file; the writers of csv, json and txt compress a path that ends in .gz, as the readers inflate it (data-language.md#compression) | e165_gzip_write.eve |
| e166 | e166_zip | zip.write(path, entries) writes a zip archive, zip.list!(path) gives the sorted names and zip.read!(path, name) one entry as Bytes (data-language.md#compression) | e166_zip.eve |
| e167 | e167_optional_argument_error | a T? name given to a plain T parameter is a compile error until a test narrows it | e167_optional_argument_error.eve |
| e168 | e168_optional_while_narrow | a test against null in the condition of a while loop narrows the name in the body; the name given to a plain parameter is then accepted | e168_optional_while_narrow.eve |
| e169 | e169_null_to_plain_field | a NULL read into a plain member of a record is $err_null (16); into an optional member it is null | e169_null_to_plain_field.eve |
| e16 | e16_macro_apply | an Eve macro: shared declarations, an exclusive aspect and the primary aspect in one file | e16_macro_apply.eve |
| e170 | e170_reader_from_stream | the readers of csv, json and fs.lines! take a Stream(:Bytes) as the source, as well as a path: gzip.open! feeds them (data-language.md#compression) | e170_reader_from_stream.eve |
| e171 | e171_test_module | the standard module test, written in Eve: checks print one line, count, and summary raises when one failed | e171_test_module.eve |
| e172 | e172_crypto | the system module crypto: hashes, HMAC, codecs, random bytes (F-LIB-10) | e172_crypto.eve |
| e173 | e173_os | the system module os: run a program without a shell, read the environment (F-LIB-07) | e173_os.eve |
| e174 | e174_json_text | json.parse and json.text: JSON text in memory and plain values (F-LIB-05) | e174_json_text.eve |
| e175 | e175_rpc | the standard module rpc, in Eve: build JSON-RPC 2.0 lines (F-NET-08) | e175_rpc.eve |
| e176 | e176_config | the standard module config, in Eve: key = value files into a DataMap (F-TLS-12) | e176_config.eve |
| e177 | e177_net | the system module net: a server and a client as tasks of one script, lines over TCP (F-NET-02) | e177_net.eve |
| e178 | e178_net_timeout | set_timeout: a read that waits too long fails with $err_timeout and the server goes on (TD-27) | e178_net_timeout.eve |
| e179 | e179_os_timeout | os.run! with a time-out: the child is killed, status 124 (TD-9, TD-27) | e179_os_timeout.eve |
| e17 | e17_macro_parallel | an Eve macro starts its concurrent aspects in a parallel group; a shared class carries the results | e17_macro_parallel.eve |
| e180 | e180_os_env | os.run! gives variables to the program it starts: a map String -> String is added to its environment (CMD-04, G-10) | e180_os_env.eve |
| e18 | e18_macro_atomic | concurrent aspects of a macro add to a shared atomic variable: the total is exact | e18_macro_atomic.eve |
| e19 | e19_macro_unsafe_variable | a concurrent aspect of a macro can not use a shared variable that is not atomic: compile error | e19_macro_unsafe_variable.eve |
| e20 | e20_macro_unsafe_procedure | a concurrent aspect of a macro can not call a shared procedure that changes a plain variable: compile error | e20_macro_unsafe_procedure.eve |
| e21 | e21_macro_two_primary | a macro has one primary aspect: a second one is a compile error | e21_macro_two_primary.eve |
| e22 | e22_macro_statement | a statement outside a declaration is a compile error in a macro | e22_macro_statement.eve |
| e23 | e23_generator_for | a generator gives its values one at a time to a for loop | e23_generator_for.eve |
| e24 | e24_generator_next | a generator object is driven step by step with next(), value, done and close() | e24_generator_next.eve |
| e25 | e25_yield_outside | yield in a function is a compile error: only the body of a generator can yield | e25_yield_outside.eve |
| e26 | e26_generator_statement | a generator called as a statement is a compile error: its values would be lost | e26_generator_statement.eve |
| e27 | e27_decimal_scale | a Decimal keeps its scale, adds exactly and compares by value | e27_decimal_scale.eve |
| e28 | e28_instant | an Instant prints in the canonical form; a bad text is the error parse | e28_instant.eve |
| e29 | e29_secret_masked | a Secret is never printed: print and interpolation write *** | e29_secret_masked.eve |
| e30 | e30_null_in_plain_field | a null for a field that is not optional is a compile error | e30_null_in_plain_field.eve |
| e31 | e31_fs_files | fs writes, appends, reads lines and reports a missing file with the error code 20 | e31_fs_files.eve |
| e32 | e32_csv_write | the CSV writer: header, quotes only when needed, null is empty and the empty string is "" | e32_csv_write.eve |
| e33 | e33_csv_read_typed | the CSV reader decodes into a record class: Decimal, Instant, null and the empty string | e33_csv_read_typed.eve |
| e34 | e34_csv_bad_row | a CSV line with a wrong number of fields is a FormatError when the loop reaches it | e34_csv_bad_row.eve |
| e35 | e35_csv_rejects | a read with a rejects output skips the bad lines and writes them in a file, in batches | e35_csv_rejects.eve |
| e36 | e36_json_lines | JSON Lines: the writer text is exact, the reader gives the records back | e36_json_lines.eve |
| e37 | e37_txt_fixed | TXT: fixed-length fields, strings left, numbers right, not trimmed; the reader slices by the widths | e37_txt_fixed.eve |
| e38 | e38_nfc | normalize: "nfc" composes e + accent into one code point; by default the text is kept as read | e38_nfc.eve |
| e39 | e39_table_unknown_key | a key that names a field the class does not have is a compile error | e39_table_unknown_key.eve |
| e40 | e40_table_reference_cycle | two tables that reference each other are a compile error | e40_table_reference_cycle.eve |
| e41 | e41_table_temporary_data | temporary is allowed only for the staging database: a table of another connection is a compile error | e41_table_temporary_data.eve |
| e42 | e42_commit_outside_job | commit; is allowed only in the do region of a job: a compile error elsewhere | e42_commit_outside_job.eve |
| e43 | e43_update_block_key | a key field can not be changed in an update block: a compile error | e43_update_block_key.eve |
| e44 | e44_table_read_only_add | a record can not be added to a read only table: a compile error | e44_table_read_only_add.eve |
| e45 | e45_job_two_writes | a job writes to one connection only: writing to two is a compile error | e45_job_two_writes.eve |
| e46 | e46_orm_dirty_fields | an update writes only the dirty fields: a column changed by direct SQL is not overwritten | e46_orm_dirty_fields.eve |
| e47 | e47_orm_conflict | optimistic locking: an update of a row that changed after it was read is a ConflictError | e47_orm_conflict.eve |
| e48 | e48_job_rollback | rollback; undoes the job: nothing is written, the status is "rolled back", the process goes on | e48_job_rollback.eve |
| e49 | e49_job_error_rollback | an error in a job rolls the transaction back before recover runs | e49_job_error_rollback.eve |
| e50 | e50_update_block | an update block changes several fields of one record without repeating its name | e50_update_block.eve |
| e51 | e51_update_block_validate | validate runs at the end of an update block, with all the fields changed together | e51_update_block_validate.eve |
| e52 | e52_mapping_version | in production the VM trusts db/mappings.json: a schema version that differs is a MappingError, exit code 4 | e52_mapping_version.eve |
| e53 | e53_commit_checkpoint | commit; ends a batch, the checkpoint (in the core database) tells the next job where to start | e53_commit_checkpoint.eve |
| e54 | e54_project_init | project init <folder> makes a new project with the standard layout (F-TLS-23) | e54_project_init.eve |
| e55 | e55_project_new_not_empty | project new <folder> fails when the folder exists and is not empty; project init does not (F-TLS-23) | e55_project_new_not_empty.eve |
| e56 | e56_etl_csv_sqlite_json | a small ETL on local storage: data/in/sales.csv is loaded into the SQLite database cache.db, transformed with SQL and written as JSON in data/out | e56_etl_csv_sqlite_json.eve |
| e57 | e57_overload_generic_plain | a plain function whose parameters fit exactly wins over a generic one with the same name | e57_overload_generic_plain.eve |
| e58 | e58_generic_constraint | a type argument must adopt the trait of its constraint: compile error | e58_generic_constraint.eve |
| e59 | e59_extension_same_signature | an extension method with the signature of a method of the class would replace it: compile error; another signature overloads it: e60 | e59_extension_same_signature.eve |
| e60 | e60_extension_overload | an extension method with another signature overloads the method of the class | e60_extension_overload.eve |
| e61 | e61_macro_needs_primary | a file with an aspect and shared declarations but no primary aspect is not a macro: compile error | e61_macro_needs_primary.eve |
| e62 | e62_macro_export | a macro exports nothing: export is a compile error | e62_macro_export.eve |
| e63 | e63_macro_aspect_scope | an aspect of a macro sees the shared declarations and no variable of the primary aspect's process | e63_macro_aspect_scope.eve |
| e64 | e64_macro_duplicate_name | a top-level name declared twice in a macro is a compile error: one scope for the whole file | e64_macro_duplicate_name.eve |
| e65 | e65_macro_aspect_conflict | an aspect of the macro with the name of an aspect file of the project is a compile error | e65_macro_aspect_conflict.eve |
| e66 | e66_generator_lazy | a generator is lazy: its body runs only when the caller asks for a value, and an infinite one is closed by break | e66_generator_lazy.eve |
| e67 | e67_generator_error | an error raised in the body ends the generator and is raised in the caller, at the for line | e67_generator_error.eve |
| e68 | e68_generator_value_early | reading g.value before the first next() is an error | e68_generator_value_early.eve |
| e69 | e69_generator_method | a generator can be a member of a class; a comprehension collects its values | e69_generator_method.eve |
| e70 | e70_generator_two_results | a generator has exactly one result: compile error | e70_generator_two_results.eve |
| e71 | e71_generator_ref_param | a generator has inputs only, by value: an @ parameter is a compile error | e71_generator_ref_param.eve |
| e72 | e72_yield_in_process | yield in a process is a compile error: only the body of a generator yields; in a function inside a generator: e104 | e72_yield_in_process.eve |
| e73 | e73_decimal_ops | Decimal arithmetic is exact: subtraction, division, negation, remainder, comparison and a whole number on one side | e73_decimal_ops.eve |
| e74 | e74_decimal_real_mix | a Decimal and a Real are never mixed without a conversion: an operand of the wrong type is a compile error | e74_decimal_real_mix.eve |
| e75 | e75_instant_forms | an Instant keeps a fraction of a second, compares by time, and a date that does not exist is the error parse | e75_instant_forms.eve |
| e76 | e76_secret_rules | a Secret prints as *** alone, in interpolation and in a collection (data-language.md#secrets); joining it to a text: e103 | e76_secret_rules.eve |
| e77 | e77_optional_fields | a field with ? holds null; a plain field never does; null is tested before use | e77_optional_fields.eve |
| e78 | e78_null_constructor_argument | null as an argument for a member that is not optional is a compile error, in a call of the class too | e78_null_constructor_argument.eve |
| e79 | e79_secret_missing | a secret that the machine does not have is the error key, code 11 (data-language.md#secrets) | e79_secret_missing.eve |
| e80 | e80_csv_options | CSV options: another separator, no header, a BOM, CRLF line ends, and columns: renames the columns of the file (data-types.md) | e80_csv_options.eve |
| e81 | e81_json_array | JSON: an array of objects is written one object per line and read back; a missing key is null; a number keeps its scale | e81_json_array.eve |
| e82 | e82_txt_rules | TXT: a value longer than its width is a FormatError, overflow: "cut" cuts it; a field of spaces is null for T? (data-types.md) | e82_txt_rules.eve |
| e83 | e83_encodings | encodings: windows-1252 and a UTF-16 BOM are decoded to text; invalid UTF-8 is an error with its place, or replaced (data-types.md) | e83_encodings.eve |
| e84 | e84_fs_functions | fs: read!, size!, list!, move, remove, make_dir, and the path functions and the operator / (data-language.md#files-and-paths) | e84_fs_functions.eve |
| e85 | e85_rejects_limit | max_rejects: the reject after the limit is an error of the read; the rejects file has source, line, column, text and reason (data-types.md) | e85_rejects_limit.eve |
| e86 | e86_stream_methods | a stream has all(), count(), close() and next() with the protocol of a generator (next() gives True and s.value); leaving the loop with break writes the rejects of what was read (data-types.md) | e86_stream_methods.eve |
| e87 | e87_orm_reads | reading through a table: find! gives the record or null, a second find! gives the same record, where! tracks, scan! does not (database.md) | e87_orm_reads.eve |
| e88 | e88_orm_write_methods | status, a field set back to its value, remove, refresh after a direct write, add and flush, detach (database.md) | e88_orm_write_methods.eve |
| e89 | e89_orm_reference_order | a flush writes inserts in the order of the references and deletes in the reverse order, whatever the order of the program (database.md) | e89_orm_reference_order.eve |
| e90 | e90_orm_validate_add | validate runs before every write: an invalid record fails the job at the flush and nothing is written (database.md, validation) | e90_orm_validate_add.eve |
| e91 | e91_orm_load | load! writes many rows at once, not tracked: "insert" adds, "upsert" inserts the new keys and updates the others (database.md) | e91_orm_load.eve |
| e92 | e92_orm_temporary | a temporary table in the staging database is made by the VM from the class at its first use (database.md, the table declaration) | e92_orm_temporary.eve |
| e93 | e93_orm_outside_job | outside a job a record that is added or changed is written and committed at once, one statement at a time (database.md, transactions) | e93_orm_outside_job.eve |
| e94 | e94_orm_retry_conflict | a conflict fails the job and rolls it back; retry runs the job again from its declarations and reads the row fresh (database.md) | e94_orm_retry_conflict.eve |
| e95 | e95_machine_doors | a machine that listens on IPC only: no web, commands run through the socket (F-NET-02, spec/library/machine.md) | e95_machine_doors.eve |
| e95 | e95_test5 (variation) | the stdio door: a machine of one client on its standard input and output (evetx, ssh host eve --stdio) | e95_test5.eve |
| e96 | e96_sql_function | sql function: an Eve function that SQLite calls from SQL, registered on every connection | e96_sql_function.eve |
| e97 | e97_sql_function_error | an error in a sql function stops the query: the statement raises $err_sql with the message of the error | e97_sql_function_error.eve |
| e98 | e98_sql_function_null | SQL NULL maps only to a nullable type: a NULL for a parameter of type String stops the query with $err_sql | e98_sql_function_null.eve |
| e99 | e99_sql_function_bang | a sql function is deterministic: its name can not end with ! | e99_sql_function_bang.eve |
Level 6: Server
The Eve machine and the server, 14 tests. The folder on GitHub.
| Code | Test | What it checks | Source |
|---|---|---|---|
| f10 | f10_route_hello | a server with routes and a client in one script: the modules net, http, route and service (F-NET-02, F-STR-08) | f10_route_hello.eve |
| f11 | f11_rpc_roundtrip | JSON-RPC 2.0 over HTTP between a server and a client on localhost: rpc, http, route, service and net together (F-NET-08) | f11_rpc_roundtrip.eve |
| f12 | f12_service_close | a service with no count runs until its listener is closed; close wakes the pending accept (F-NET-02) | f12_service_close.eve |
| f14 | f14_service_idle | a client that sends nothing gets a 408 after the idle time and the next client is served (TD-29) | f14_service_idle.eve |
| f17 | f17_http_door | the HTTP door is safe by default: a foreign Host or Origin is refused, the lasting-door methods and os.run! are out of reach (F-NET-10, S6.0) | f17_http_door.eve |
| f18 | f18_route_register | a Route registers itself when it is made: a static route with set, a dynamic one with new in main, no table passed to the service (D-242, F-STR-08) | f18_route_register.eve |
| f19 | f19_pg_driver | the Eve driver for PostgreSQL: a remote connection to evedb on its PostgreSQL port, md5 login (drivers/duckdb/README.md 5A, 5B) | f19_pg_driver.eve |
| f20 | f20_evedb_columnar | the native driver evedb://: typed parameters, records, a job, and the column batches of Memory tables | f20_evedb_columnar.eve |
| f21 | f21_web_hello | the Eve web server answers with a page: Hello World, This is Eve (F-NET-02, first step) | f21_web_hello.eve |
| f21 | f21_test2 (variation) | a machine that serves HTTP only: pages and scripts over the web port (F-NET-02, spec/library/machine.md) | f21_test2.eve |
| f21 | f21_test3 (variation) | a machine that listens on IPC and serves HTTP: the CLI uses IPC, a remote uses HTTP (F-NET-02, spec/library/machine.md) | f21_test3.eve |
| f21 | f21_test4 (variation) | the machine API over HTTP: vm.* and the first names, -32601, the web door; started and stopped as the UI part | f21_test4.eve |
| f22 | f22_service_routes | a primary aspect is a service: evedb -s runs main, then serves the routes the script made on the HTTP port | f22_service_routes.eve |
| f23 | f23_route_duplicate | the same method and path twice is an error when the second Route is made | f23_route_duplicate.eve |
Level 7: Web
The web, no tests yet. The folder on GitHub.