/* Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/publicdomain/zero/1.0/
 * 
 * exploitation.cpp
 *
 * Author: pgess <v.melnychenko@xreate.org>
 * Created on February 15, 2018, 6:17 PM
 */

#include "xreatemanager.h"
#include "gtest/gtest.h"

using namespace xreate;

TEST(Exploitation, test1){
    FILE* input = fopen("scripts/exploitation/test1.xreate","r");
    assert(input != nullptr);

    std::unique_ptr<XreateManager> man(XreateManager::prepare(input));

    int (*main)() = (int (*)())man->run();
    int result = main();

    ASSERT_EQ(1, result);
}