File: histogramtest.cpp

package info (click to toggle)
ffmpegthumbnailer 2.0.8-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,744 kB
  • ctags: 374
  • sloc: sh: 11,133; cpp: 2,361; makefile: 69
file content (36 lines) | stat: -rw-r--r-- 597 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <gtest/gtest.h>

#include <string>
#include <vector>
#include <iostream>

#include "libffmpegthumbnailer/histogram.h"

namespace ffmpegthumbnailer
{

TEST(HistogramTest, CreationInt)
{
    Histogram<int> hist;
    
    for (int i = 0; i < 255; ++i)
    {
        EXPECT_EQ(0, hist.r[i]);
        EXPECT_EQ(0, hist.g[i]);
        EXPECT_EQ(0, hist.b[i]);
    }
}

TEST(HistogramTest, CreationFloat)
{
    Histogram<float> hist;
    
    for (int i = 0; i < 255; ++i)
    {
        EXPECT_EQ(0.0, hist.r[i]);
        EXPECT_EQ(0.0, hist.g[i]);
        EXPECT_EQ(0.0, hist.b[i]);
    }
}

}