Skip to content

Commit

Permalink
Add a couple more tests
Browse files Browse the repository at this point in the history
To test some parts of the code where, if we fail, we only find out
in almond-dialog-agent or genie and then it's pain to fix
  • Loading branch information
gcampax committed Nov 1, 2019
1 parent a7ffe83 commit 341a7aa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/sample.apps
Expand Up @@ -1942,3 +1942,10 @@ now => @light-bulb(name="bathroom").set_power(power=enum(on));
now => @light-bulb(name="ceiling").set_power(power=enum(on));

let query x(p_name : String) := @light-bulb(name=p_name).set_power(power=enum(on));

====

dataset @light-bulb {
action (p_name : String) := @light-bulb(name=p_name).set_power(power=enum(on))
#_[utterances=["turn on my $p_name lights"]];
}
3 changes: 3 additions & 0 deletions test/test_example_program.js
Expand Up @@ -39,6 +39,9 @@ var TEST_CASES = [

['dataset foo { action (p_song1 : String, p_song2 : String) := @com.spotify.play_songs(songs=[p_song1, p_song2]); }',
'now => @com.spotify.play_songs(songs=[__const_SLOT_0, __const_SLOT_1]);'],

['dataset foo { action (p_name : String) := @light-bulb(name=p_name).set_power(power=enum(on)); }',
'now => @light-bulb(name=__const_SLOT_0).set_power(power=enum(on));'],
];

function test(i) {
Expand Down

0 comments on commit 341a7aa

Please sign in to comment.