Skip to content

Commit

Permalink
Fix a broken test.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadden committed Sep 16, 2020
1 parent 2edfb67 commit e33f5cb
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions unit_tests/signals/text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

#include <testing.hpp>

#include <alia/signals/basic.hpp>
#include <alia/flow/macros.hpp>
#include <alia/flow/try_catch.hpp>

#include "traversal.hpp"

Expand All @@ -21,11 +22,19 @@ TEST_CASE("printf", "[signals][text]")
// MSVC is too forgiving of bad format strings, so this test doesn't
// actually work there.
#ifndef _MSC_VER
do_text(ctx, printf(ctx, "bad format: %q", value(0)));
alia_try
{
do_text(ctx, printf(ctx, "bad format: %q", value(0)));
}
alia_catch(...)
{
do_text(ctx, value("(error)"));
}
alia_end
#endif
};

check_traversal(sys, controller, "hello world;n is 2.1;");
check_traversal(sys, controller, "hello world;n is 2.1;(error);");
}

TEST_CASE("text conversions", "[signals][text]")
Expand Down

0 comments on commit e33f5cb

Please sign in to comment.