1
0

Update implementation tests

This commit is contained in:
Jeff 2023-10-18 22:05:16 -04:00
parent 36a6f5f548
commit 33bacfc100
2 changed files with 74 additions and 18 deletions

View File

@ -1,6 +0,0 @@
# This will read a CSV file and display it as a line plot in a GUI window.
read_file("examples/assets/faithful.csv")
-> from_csv(input)
-> rows(input)
-> transform(input, 'input.1')
-> plot(input);

View File

@ -1,6 +1,13 @@
use std::fs::read_to_string;
use dust::*;
use dust_lang::*;
#[test]
fn clue_solver() {
let file_contents = read_to_string("examples/clue_solver").unwrap();
evaluate(&file_contents).unwrap();
}
#[test]
fn collections() {
@ -10,12 +17,67 @@ fn collections() {
}
#[test]
fn list() {
let file_contents = read_to_string("examples/list.ds").unwrap();
fn data_formats() {
let file_contents = read_to_string("examples/data_formats.ds").unwrap();
evaluate(&file_contents).unwrap();
}
#[test]
fn fetch() {
let file_contents = read_to_string("examples/fetch.ds").unwrap();
evaluate(&file_contents).unwrap();
}
#[test]
fn fibonacci() {
let file_contents = read_to_string("examples/fibonacci.ds").unwrap();
evaluate(&file_contents).unwrap();
}
#[test]
fn find_loop() {
let file_contents = read_to_string("examples/find_loop.ds").unwrap();
evaluate(&file_contents).unwrap();
}
#[test]
fn fizz_buzz() {
let file_contents = read_to_string("examples/fizz_buzz.ds").unwrap();
evaluate(&file_contents).unwrap();
}
#[test]
fn for_loop() {
let file_contents = read_to_string("examples/for_loop.ds").unwrap();
evaluate(&file_contents).unwrap();
}
#[test]
fn hello_world() {
let file_contents = read_to_string("examples/hello_world.ds").unwrap();
evaluate(&file_contents).unwrap();
}
#[test]
fn remove_loop() {
let file_contents = read_to_string("examples/remove_loop.ds").unwrap();
evaluate(&file_contents).unwrap();
}
#[test]
fn scope() {
let file_contents = read_to_string("examples/scope.ds").unwrap();
evaluate(&file_contents).unwrap();
}
#[test]
fn table() {
let file_contents = read_to_string("examples/table.ds").unwrap();
@ -23,6 +85,13 @@ fn table() {
evaluate(&file_contents).unwrap();
}
#[test]
fn transform_loop() {
let file_contents = read_to_string("examples/transform_loop.ds").unwrap();
evaluate(&file_contents).unwrap();
}
#[test]
fn variables() {
let file_contents = read_to_string("examples/variables.ds").unwrap();
@ -31,15 +100,8 @@ fn variables() {
}
#[test]
fn scope() {
let file_contents = read_to_string("examples/scope.ds").unwrap();
evaluate(&file_contents).unwrap();
}
#[test]
fn data_formats() {
let file_contents = read_to_string("examples/data_formats.ds").unwrap();
fn while_loop() {
let file_contents = read_to_string("examples/while_loop.ds").unwrap();
evaluate(&file_contents).unwrap();
}