156760Srwatson// Copyright 2011 The Kyua Authors.
2108412Srwatson// All rights reserved.
356760Srwatson//
456760Srwatson// Redistribution and use in source and binary forms, with or without
5108412Srwatson// modification, are permitted provided that the following conditions are
6108412Srwatson// met:
756760Srwatson//
856760Srwatson// * Redistributions of source code must retain the above copyright
956760Srwatson//   notice, this list of conditions and the following disclaimer.
1056760Srwatson// * Redistributions in binary form must reproduce the above copyright
1156760Srwatson//   notice, this list of conditions and the following disclaimer in the
1256760Srwatson//   documentation and/or other materials provided with the distribution.
1356760Srwatson// * Neither the name of Google Inc. nor the names of its contributors
1456760Srwatson//   may be used to endorse or promote products derived from this software
1556760Srwatson//   without specific prior written permission.
1656760Srwatson//
1756760Srwatson// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1856760Srwatson// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1956760Srwatson// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2056760Srwatson// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2156760Srwatson// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2256760Srwatson// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2356760Srwatson// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2456760Srwatson// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2556760Srwatson// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2656760Srwatson// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2756760Srwatson// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2866076Srwatson
2956760Srwatson#include <iostream>
3056760Srwatson
3156760Srwatson#include <atf-c++.hpp>
3279531Sru
3356760Srwatson
3456760SrwatsonATF_TEST_CASE_WITHOUT_HEAD(fail);
3559514SphantomATF_TEST_CASE_BODY(fail)
3659514Sphantom{
3775222Sru    std::cout << "This is the stdout of fail\n";
3856760Srwatson    std::cerr << "This is the stderr of fail\n";
3984306Sru    fail("This fails on purpose");
4084306Sru}
4156760Srwatson
4256760Srwatson
4356760SrwatsonATF_TEST_CASE_WITHOUT_HEAD(pass);
4456760SrwatsonATF_TEST_CASE_BODY(pass)
4556760Srwatson{
4656760Srwatson}
4756760Srwatson
4870481Sru
49131504SruATF_INIT_TEST_CASES(tcs)
50131504Sru{
5156791Smpp    ATF_ADD_TEST_CASE(tcs, fail);
5256760Srwatson    ATF_ADD_TEST_CASE(tcs, pass);
5356760Srwatson}
5456760Srwatson