forked from potassco-asp-course/systems
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclintest.tex
38 lines (36 loc) · 1.16 KB
/
clintest.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
% ----------------------------------------------------------------------
\begin{frame}{\clintest}
\begin{itemize}
\item \structure{Idea} \ test logic programs
\item \structure{Features}
\begin{itemize}
\item numerous off-the-shelf tests
\item support for integrating custom-build tests
\item efficent test execution by steering the solving process
\end{itemize}
\item \structure{Technology} \ \clingo
\end{itemize}
\end{frame}
% ----------------------------------------------------------------------
\begin{frame}[fragile]{Example}{Testing at work}
\begin{lstlisting}[language=python,basicstyle=\small\ttfamily]
from clintest.test import Assert, And
from clintest.quantifier import All, Any
from clintest.assertion import Contains
from clintest.solver import Clingo
solver = Clingo("0", "a. {b}.")
test = And(
Assert(Any(), Contains("a")),
Assert(All(), Contains("b")),
Assert(Any(), Contains("c")),
)
solver.solve(test)
test.assert_()
\end{lstlisting}
\end{frame}
% ----------------------------------------------------------------------
%
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "../../main"
%%% End: