improve kaptan-spec as a build library and move it to libs dir

Signed-off-by: Onur Özkan <work@onurozkan.dev>
This commit is contained in:
Onur Özkan committed 2026-07-18 14:06:42 +03:00
1 parent 85559bd2d5
commit 8d9790de00
18 files changed
+237 -200

No files matched your search

@@ -0,0 +1,5 @@
use kaptan_spec::no_spec;
no_spec!(" ");
fn main() {}
@@ -0,0 +1,7 @@
error[E0080]: evaluation panicked: no-spec explanation must not be empty; use no_spec!("reason");
--> tests/ui/fail_empty_explanation.rs:3:1
|
3 | no_spec!(" ");
| ^^^^^^^^^^^^^^^ evaluation of `_` failed here
|
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `no_spec` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -0,0 +1,5 @@
use kaptan_spec::no_spec;
no_spec!();
fn main() {}
@@ -0,0 +1,7 @@
error: missing no-spec explanation; use no_spec!("reason");
--> tests/ui/fail_missing_argument.rs:3:1
|
3 | no_spec!();
| ^^^^^^^^^^
|
= note: this error originates in the macro `no_spec` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -0,0 +1,5 @@
use kaptan_spec::no_spec;
no_spec!(42);
fn main() {}
@@ -0,0 +1,20 @@
error[E0308]: mismatched types
--> tests/ui/fail_non_string_argument.rs:3:10
|
3 | no_spec!(42);
| ^^ expected `&str`, found integer
error[E0308]: mismatched types
--> tests/ui/fail_non_string_argument.rs:3:10
|
3 | no_spec!(42);
| ---------^^-
| | |
| | expected `&str`, found integer
| arguments to this function are incorrect
|
note: function defined here
--> src/lib.rs
|
| pub const fn has_non_whitespace(value: &str) -> bool {
| ^^^^^^^^^^^^^^^^^^
+5
View File
@@ -0,0 +1,5 @@
use kaptan_spec::no_spec;
no_spec!("This fixture has no governed runtime behavior.");
fn main() {}