[M120 Migration][VD] Remove accessing oom_score_adj in zygote process
[platform/framework/web/chromium-efl.git] / printing / page_range_unittest.cc
1 // Copyright 2011 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "printing/page_range.h"
6 #include "testing/gmock/include/gmock/gmock.h"
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 TEST(PageRangeTest, RangeMerge) {
10   printing::PageRanges ranges;
11   ranges.push_back({1, 3});
12   ranges.push_back({10, 12});
13   ranges.push_back({2, 5});
14   ranges.push_back({12, 13});
15   ranges.push_back({14, 14});
16
17   printing::PageRange::Normalize(ranges);
18   EXPECT_THAT(ranges, testing::ElementsAreArray<printing::PageRange>(
19                           {{1, 5}, {10, 14}}));
20 }
21
22 TEST(PageRangeTest, Empty) {
23   printing::PageRanges ranges;
24   printing::PageRange::Normalize(ranges);
25   EXPECT_THAT(ranges, testing::IsEmpty());
26 }
27
28 TEST(PageRangeTest, SingleEntry) {
29   printing::PageRanges ranges;
30   ranges.push_back({1, 1});
31   EXPECT_THAT(ranges, testing::ElementsAre(printing::PageRange{1, 1}));
32 }