Jlm
Loading...
Searching...
No Matches
jlm
rvsdg
TypeMismatchTests.cpp
Go to the documentation of this file.
1
/*
2
* Copyright 2010 2011 2012 2014 Helge Bahmann <hcb@chaoticmind.net>
3
* Copyright 2014 2015 Nico Reißmann <nico.reissmann@gmail.com>
4
* See COPYING for terms of redistribution.
5
*/
6
7
#include <gtest/gtest.h>
8
9
#include <
jlm/rvsdg/graph.hpp
>
10
#include <
jlm/rvsdg/TestOperations.hpp
>
11
#include <
jlm/rvsdg/TestType.hpp
>
12
13
TEST
(TypeMismatchTests, test_main)
14
{
15
using namespace
jlm::rvsdg
;
16
17
Graph
graph;
18
19
auto
type =
jlm::rvsdg::TestType::createStateType
();
20
auto
value_type = TestType::createValueType();
21
22
auto
n1 = TestOperation::createNode(&graph.
GetRootRegion
(), {}, { type });
23
24
// Act & Assert
25
EXPECT_THROW(
26
TestOperation::createNode(&graph.
GetRootRegion
(), { value_type }, { n1->output(0) }, {}),
27
jlm::util::TypeError
);
28
}
TestOperations.hpp
TestType.hpp
TEST
TEST(TypeMismatchTests, test_main)
Definition
TypeMismatchTests.cpp:13
jlm::rvsdg::Graph
Definition
graph.hpp:75
jlm::rvsdg::Graph::GetRootRegion
Region & GetRootRegion() const noexcept
Definition
graph.hpp:99
jlm::rvsdg::TestType::createStateType
static std::shared_ptr< const TestType > createStateType()
Definition
TestType.cpp:60
jlm::util::TypeError
Definition
common.hpp:67
graph.hpp
jlm::rvsdg
Definition
add-sinks.hpp:12
Generated by
1.9.8