gtest_xml_outfile2_test_.cc revision 41d0579e8de9ef4ff178fc4991043c61a19943f7
1a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// Copyright 2008, Google Inc. 2a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// All rights reserved. 3a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// 4a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// Redistribution and use in source and binary forms, with or without 5a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// modification, are permitted provided that the following conditions are 6a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// met: 7a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// 8a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// * Redistributions of source code must retain the above copyright 9a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// notice, this list of conditions and the following disclaimer. 10a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// * Redistributions in binary form must reproduce the above 11a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// copyright notice, this list of conditions and the following disclaimer 12a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// in the documentation and/or other materials provided with the 13a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// distribution. 14a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// * Neither the name of Google Inc. nor the names of its 15a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// contributors may be used to endorse or promote products derived from 16a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// this software without specific prior written permission. 17a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// 18a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// 30a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// Author: keith.ray@gmail.com (Keith Ray) 31a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// 32a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// gtest_xml_outfile2_test_ writes some xml via TestProperty used by 33a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin// gtest_xml_outfiles_test.py 34a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin 35a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin#include "gtest/gtest.h" 36a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin 37a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkinclass PropertyTwo : public testing::Test { 38a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin protected: 39a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin virtual void SetUp() { 40a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin RecordProperty("SetUpProp", 2); 41a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin } 42a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin virtual void TearDown() { 43a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin RecordProperty("TearDownProp", 2); 44a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin } 45a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin}; 46a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin 47a6451827d543eb00824bc95097e47d0aac51ae93Alexander GutkinTEST_F(PropertyTwo, TestSomeProperties) { 48a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin RecordProperty("TestSomeProperty", 2); 49a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin} 50a6451827d543eb00824bc95097e47d0aac51ae93Alexander Gutkin