Skip to content

Commit 435958f

Browse files
Unit test for goto_trace::output
1 parent 5a0343f commit 435958f

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*******************************************************************\
2+
3+
Module: Unit tests for goto_trace_stept::output
4+
5+
Author: Diffblue Limited. All rights reserved.
6+
7+
\*******************************************************************/
8+
9+
#include <testing-utils/catch.hpp>
10+
#include <goto-programs/goto_program_template.h>
11+
#include <goto-programs/goto_trace.h>
12+
#include <iostream>
13+
14+
SCENARIO(
15+
"Output trace with nil lhs object",
16+
"[core][goto-programs][goto_trace]")
17+
{
18+
symbol_tablet symbol_table;
19+
namespacet ns(symbol_table);
20+
goto_programt::instructionst instructions;
21+
instructions.emplace_back(goto_program_instruction_typet::OTHER);
22+
goto_trace_stept step;
23+
step.pc = instructions.begin();
24+
step.type = goto_trace_stept::typet::ATOMIC_BEGIN;
25+
step.output(ns, std::cout);
26+
}

0 commit comments

Comments
 (0)