Skip to content

Commit 44aad20

Browse files
committed
Tests and typos
1 parent a4666a9 commit 44aad20

File tree

4 files changed

+32
-10
lines changed

4 files changed

+32
-10
lines changed

Makefile.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ eval $COMMAND --help
2121
[tasks.cross]
2222
dependencies = ["playground-proxy"]
2323

24+
[tasks.tests]
25+
dependencies = ["docker-compose"]
26+
command = "cargo"
27+
args = ["nextest", "run", "r", "--workspace"]
28+
2429
[tasks.docs]
2530
command = "cargo"
2631
args = ["doc", "--workspace", "--all-features"]

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,11 @@ flowchart LR
302302
SQL --pest--> I[Internal representation] --serde--> JSON --> Jsonnet
303303
```
304304

305-
## Building from source
305+
## Development
306306

307-
Install [cargo make](https://github.com/sagiegurari/cargo-make) and run:
307+
Install [cargo make](https://github.com/sagiegurari/cargo-make).
308+
309+
### Building from source
308310

309311
```
310312
$ cargo make packages
@@ -316,6 +318,21 @@ $ # Build playground
316318
$ cargo make playground-wasm
317319
```
318320

321+
### Running checks and tests
322+
323+
Install [checkalot](https://github.com/cpg314/checkalot) and run:
324+
325+
```
326+
$ cargo checkalot
327+
```
328+
329+
This runs in particular
330+
331+
```
332+
$ cargo make docker-compose
333+
$ cargo nextest run --workspace -r
334+
```
335+
319336
## TODO
320337

321338
- Proxy:

checkalot.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ checks:
3434

3535
- type: command
3636
name: tests
37-
command: cargo nextest run -r
37+
command: cargo nextest run -r --workspace
3838

3939
- type: command
4040
name: doctest

sqlsonnet/src/jsonnet/mod.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ macro_rules! val {
6969
}
7070
};
7171
}
72-
macro_rules! val_infaillible {
72+
macro_rules! val_infallible {
7373
($t: ty) => {
7474
impl Value for $t {
7575
fn try_into_val(self) -> Result<Val, crate::Error> {
@@ -80,14 +80,14 @@ macro_rules! val_infaillible {
8080
}
8181
val!(f32);
8282
val!(f64);
83-
val_infaillible!(u16);
84-
val_infaillible!(i16);
85-
val_infaillible!(u8);
86-
val_infaillible!(i8);
83+
val_infallible!(u16);
84+
val_infallible!(i16);
85+
val_infallible!(u8);
86+
val_infallible!(i8);
8787
val!(u64);
8888
val!(i64);
89-
val_infaillible!(u32);
90-
val_infaillible!(i32);
89+
val_infallible!(u32);
90+
val_infallible!(i32);
9191

9292
impl<R: ImportResolver> Options<R> {
9393
pub fn add_var(&mut self, name: &str, var: impl Value) -> Result<(), crate::Error> {

0 commit comments

Comments
 (0)