Commit 2a0f88b8 authored by Roland Levillain's avatar Roland Levillain
Browse files

Add simple tests for point2d and dpoint2d.

	* tests/dpoint2d.cc, tests/point2d.cc: New tests.
	* tests/image_entry.cc: Fix comments.
	* tests/Makefile.am (check_PROGRAMS): Add dpoint2d and point2d.
	(dpoint2d_SOURCES, point2d_SOURCES): New.


git-svn-id: https://svn.lrde.epita.fr/svn/oln/trunk@601 4aad255d-cdde-0310-9447-f3009e2ae8c0
parent 03d01fa8
2006-10-02 Roland Levillain <roland@lrde.epita.fr>
Add simple tests for point2d and dpoint2d.
* tests/dpoint2d.cc, tests/point2d.cc: New tests.
* tests/image_entry.cc: Fix comments.
* tests/Makefile.am (check_PROGRAMS): Add dpoint2d and point2d.
(dpoint2d_SOURCES, point2d_SOURCES): New.
2006-10-02 Roland Levillain <roland@lrde.epita.fr>
Separate tracked_ptr from array2d.
......
......@@ -16,6 +16,8 @@ CXXFLAGS += $(TESTS_CXXFLAGS)
check_PROGRAMS = \
dpoint2d \
point2d \
grid \
image_entry \
image2d \
......@@ -28,6 +30,8 @@ check_PROGRAMS = \
fill
# Images and auxiliary structures.
dpoint2d_SOURCES = dpoint2d.cc
point2d_SOURCES = point2d.cc
grid_SOURCES = grid.cc
image_entry_SOURCES = image_entry.cc
image2d_SOURCES = image2d.cc
......
// Copyright (C) 2006 EPITA Research and Development Laboratory
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
// of the GNU General Public License version 2 as published by the
// Free Software Foundation.
//
// This library 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
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this library; see the file COPYING. If not, write to
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
// Boston, MA 02111-1307, USA.
//
// As a special exception, you may use this file as part of a free
// software library without restriction. Specifically, if other files
// instantiate templates or use macros or inline functions from this
// file, or you compile this file and link it with other files to
// produce an executable, this file does not by itself cause the
// resulting executable to be covered by the GNU General Public
// License. This exception does not however invalidate any other
// reasons why the executable file might be covered by the GNU General
// Public License.
/// Test oln::image_entry.
#include <mlc/assert.hh>
#include <mlc/cmp.hh>
// // FIXME: Fix oln/basics2d.hh!
// #include <oln/core/2d/point2d.hh>
// namespace oln { template class point2d_<int>; }
// #include <oln/core/2d/dpoint2d.hh>
#include <oln/basics2d.hh>
int
main()
{
typedef oln::dpoint2d_<int> dpoint2d;
typedef oln:: stc_get_supers(dpoint2d) dpoint2d_super_type;
mlc::assert_<
mlc_eq( dpoint2d_super_type, oln::internal::dpoint_nd< dpoint2d > )
>::check();
}
......@@ -25,15 +25,13 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
/// Test oln::abstract::image_entry.
/// Test oln::image_entry.
// FIXME: Check also with a (possibly fake) ntg::int_u<1, B> type, to
// stress image_typeness.hh. This might be done in another test, of
// course.
#include <oln/basics2d.hh>
#include <oln/core/image_entry.hh>
namespace my
{
// Forward declaration.
......
// Copyright (C) 2006 EPITA Research and Development Laboratory
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
// of the GNU General Public License version 2 as published by the
// Free Software Foundation.
//
// This library 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
// General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this library; see the file COPYING. If not, write to
// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
// Boston, MA 02111-1307, USA.
//
// As a special exception, you may use this file as part of a free
// software library without restriction. Specifically, if other files
// instantiate templates or use macros or inline functions from this
// file, or you compile this file and link it with other files to
// produce an executable, this file does not by itself cause the
// resulting executable to be covered by the GNU General Public
// License. This exception does not however invalidate any other
// reasons why the executable file might be covered by the GNU General
// Public License.
#include <mlc/assert.hh>
#include <mlc/cmp.hh>
// FIXME: Don't include oln/basics2d.hh, which is too big.
// (Fix.)
#include <oln/basics2d.hh>
int
main()
{
typedef oln::point2d_<int> point2d;
typedef oln:: stc_get_supers(point2d) point2d_super_type;
mlc::assert_<
mlc_eq( point2d_super_type, oln::internal::point_nd< point2d > )
>::check();
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment