Skip to content

Commit

Permalink
[Rel v0.2] Migrate leftovers (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
gkastrinis authored Sep 3, 2024
1 parent 78b45d3 commit d4bb172
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ using RAITest
@test_rel(
name = "Descriptive name",
query = "def output = 1 ic {output = 1}",
query = "def output { 1 } ic () requires output = 1",
engine = "Name of my pre-existing compute engine",
)
```
Expand All @@ -24,11 +24,11 @@ using RAITest
resize_test_engine_pool!(2)
@test_rel("def output = 1 ic {output = 1}")
@test_rel("def output { 1 } ic () requires output = 1")
@test_rel(
name = "Descriptive name",
query = "def output = 1 ic {output = 1}",
query = "def output { 1 } ic () requires output = 1",
)
destroy_test_engines!()
Expand All @@ -41,7 +41,7 @@ using RAITest
add_test_engine!("<Your engine name>")
@test_rel("def output = 1 ic {output = 1}")
@test_rel("def output { 1 } ic () requires output = 1")
```

Expand All @@ -58,7 +58,7 @@ provision_all_test_engines()
@testset RAITestSet "My tests" begin
for i in 1:10
query = "def output = $i ic { output = $i }"
query = "def output { $i } ic () requires output = $i"
@test_rel(query = query, debug = true)
end
end
Expand All @@ -75,7 +75,7 @@ using Test
set_engine_creater!((name)->create_default_engine(name, "M"))
@testset "My tests" begin
for i in 1:10
query = "def output = $i ic { output = $i }"
query = "def output { $i } ic () requires output = $i"
@test_rel(query = query, debug = true)
end
end
Expand Down
4 changes: 2 additions & 2 deletions src/code-util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ build_path(name::Any, ::Any) = string(name)

# Extract relation names from the inputs and adds them to the program
# Turns a dict of name=>vector, with names of form :othername/Type,
# into a series of def name = list of tuples
# into a series of def name { list of tuples }
function convert_input_dict_to_string(inputs::AbstractDict)
program = ""
for input in inputs
name = string(input.first)

program *= "\ndef insert[:" * name * "] { "
program *= "\ndef insert[:" * name * "]: { "

values = to_vector_of_tuples(input.second)
program *= join([input_element_to_string(v) for v in values], "; ")
Expand Down

0 comments on commit d4bb172

Please sign in to comment.