Skip to content
Snippets Groups Projects
Commit e373c705 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

allow change of aql execution result from inside

parent 86fd0262
No related branches found
No related tags found
No related merge requests found
Pipeline #23744 canceled
Loading
  • Owner

    Kdyz uz jsi v tom aql, muzu poprosit i o obaleni te vyjimky invalid_argument, at jsou parser->run() vyjimky jednotne strukturovane?

  • Owner

    Jak tohle muzu pouzit? Rekneme ze mam neco takoveho:

    cli::Environment environment;
    for ( const std::string & q : queries ) {
        cli::Parser parser = cli::Parser ( cli::Lexer ( q ) );
        cli::Command::Result cliresult = parser.parse ( ) -> run ( environment );
        EXPECT_EQ ( cliresult, cli::Command::Result::OK );
    }
    EXPECT_EQ ( environment.getResult ( ), 1 );

    V queries je neco jako: { "execute randautomaton", "compare::AutomatonCompare <(neco) <(neco)" }. Chtel bych zkontrolovat, ze compare::AutomatonCompare vratilo 1, ale podle testu to vraci 0.

  • Author Owner

    Misto execute pouzij quit nebo exit.

  • Owner

    To ze to na result=true vraci 0 je kompatibilita kvuli bashi?

    $ ./aql2 -q "execute RandomAutomatonFactory 2 2 true 2 > \$x" -q "execute RandomAutomatonFactory 3 2 true 2 >\$y" -q "quit compare::AutomatonCompare \$x \$x" ; echo $?
    0
    tomas@enterprise /media/data/zdrojaky/alt/automata-library/release/aql2 (dev-tp)  
    $ ./aql2 -q "execute RandomAutomatonFactory 2 2 true 2 > \$x" -q "execute RandomAutomatonFactory 3 2 true 2 >\$y" -q "quit compare::AutomatonCompare \$x \$y" ; echo $?
    1
  • Author Owner

    Ano. Až bude aql umět aritmetické a logické operace asi to změním.

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment