File: tscript.cpp

package info (click to toggle)
aoflagger 3.4.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,960 kB
  • sloc: cpp: 83,076; python: 10,187; sh: 260; makefile: 178
file content (17 lines) | stat: -rw-r--r-- 542 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <boost/test/unit_test.hpp>

#include "../../interface/aoflagger.h"

BOOST_AUTO_TEST_SUITE(lua_scripting, *boost::unit_test::label("lua"))

BOOST_AUTO_TEST_CASE(raise_exception) {
  aoflagger::AOFlagger flagger;
  aoflagger::Strategy strategy = flagger.LoadStrategyString(
      "function execute(input)\n"
      "  error(\"test for raising an error\")\n"
      "end\n");
  aoflagger::ImageSet imageSet = flagger.MakeImageSet(10, 10, 1);
  BOOST_CHECK_THROW(strategy.Run(imageSet), std::runtime_error);
}

BOOST_AUTO_TEST_SUITE_END()