From eb7a797c26f779b9ad91b4a5de88744cac98896b Mon Sep 17 00:00:00 2001 From: ser1zw Date: Sat, 21 May 2011 01:48:14 +0900 Subject: [PATCH] added test for CvAvgComp --- test/test_cvavgcomp.rb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 test/test_cvavgcomp.rb diff --git a/test/test_cvavgcomp.rb b/test/test_cvavgcomp.rb new file mode 100755 index 0000000..2322b20 --- /dev/null +++ b/test/test_cvavgcomp.rb @@ -0,0 +1,24 @@ +#!/usr/bin/env ruby +# -*- mode: ruby; coding: utf-8-unix -*- +require 'test/unit' +require 'opencv' +require File.expand_path(File.dirname(__FILE__)) + '/helper' + +include OpenCV + +# Tests for OpenCV::CvAvgComp +class TestCvAvgComp < OpenCVTestCase + def setup + @avgcomp = CvAvgComp.new + end + + def test_initialize + assert_equal(CvAvgComp, @avgcomp.class) + assert(@avgcomp.is_a? CvRect) + end + + def test_neighbors + assert_equal(Fixnum, @avgcomp.neighbors.class) + end +end +