diff options
Diffstat (limited to 'test/test_asc2bin.cc')
-rw-r--r-- | test/test_asc2bin.cc | 37 |
1 files changed, 32 insertions, 5 deletions
diff --git a/test/test_asc2bin.cc b/test/test_asc2bin.cc index 38010bf..1663c70 100644 --- a/test/test_asc2bin.cc +++ b/test/test_asc2bin.cc @@ -1,3 +1,30 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set et sw=2 ts=2: */ +/*************************************************************************** + * test_asc2bin.cc + * + * Mon Sep 2 14:02:16 CEST 2013 + * Copyright 2013 Bent Bisballe Nyeng + * deva@aasimon.org + ****************************************************************************/ + +/* + * This file is part of lrtp. + * + * lrtp is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * lrtp is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with lrtp; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ #include <cppunit/extensions/HelperMacros.h> #include "../src/asc2bin.h" @@ -5,11 +32,11 @@ static int g_i = -1; -class test_asc2bin : public CppUnit::TestFixture +class test_asc2bin_class : public CppUnit::TestFixture { - CPPUNIT_TEST_SUITE(test_asc2bin); + CPPUNIT_TEST_SUITE(test_asc2bin_class); CPPUNIT_TEST(test_asc2nibble); - CPPUNIT_TEST(test_asc2bin_); + CPPUNIT_TEST(test_asc2bin); CPPUNIT_TEST_SUITE_END(); public: @@ -42,7 +69,7 @@ public: CPPUNIT_ASSERT_EQUAL(asc2nibble('F'), 0xf); } - void test_asc2bin_() { + void test_asc2bin() { char val[32] = {}; const char h[] = "0123456789abcdefABCDEF0000000000"; char ref[] = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, @@ -62,4 +89,4 @@ public: }; // Registers the fixture into the 'registry' -CPPUNIT_TEST_SUITE_REGISTRATION(test_asc2bin); +CPPUNIT_TEST_SUITE_REGISTRATION(test_asc2bin_class); |