blob: 01c24ff2b56340343adb4ef63c44c21e8569e4bb [file] [log] [blame]
Dichen Zhang85b37562022-10-11 11:08:28 -07001/*
2 * Copyright 2022 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Nick Deakin594a4ca2022-11-16 20:57:42 -050017#include <gtest/gtest.h>
Dichen Zhang85b37562022-10-11 11:08:28 -070018#include <jpegrecoverymap/recoverymap.h>
19
Nick Deakin594a4ca2022-11-16 20:57:42 -050020namespace android::recoverymap {
Dichen Zhang85b37562022-10-11 11:08:28 -070021
Nick Deakin594a4ca2022-11-16 20:57:42 -050022class RecoveryMapTest : public testing::Test {
23public:
24 RecoveryMapTest();
25 ~RecoveryMapTest();
26protected:
27 virtual void SetUp();
28 virtual void TearDown();
29};
30
31RecoveryMapTest::RecoveryMapTest() {}
32RecoveryMapTest::~RecoveryMapTest() {}
33
34void RecoveryMapTest::SetUp() {}
35void RecoveryMapTest::TearDown() {}
36
37TEST_F(RecoveryMapTest, build) {
38 // Force all of the recovery map lib to be linked by calling all public functions.
39 RecoveryMap recovery_map;
Dichen Zhang636f5242022-12-07 20:25:44 +000040 recovery_map.encodeJPEGR(nullptr, static_cast<jpegr_transfer_function>(0), nullptr, 0, nullptr);
Nick Deakin6bd90432022-11-20 16:26:37 -050041 recovery_map.encodeJPEGR(nullptr, nullptr, static_cast<jpegr_transfer_function>(0),
42 nullptr, 0, nullptr);
43 recovery_map.encodeJPEGR(nullptr, nullptr, nullptr, static_cast<jpegr_transfer_function>(0),
44 nullptr);
45 recovery_map.encodeJPEGR(nullptr, nullptr, static_cast<jpegr_transfer_function>(0), nullptr);
Nick Deakin594a4ca2022-11-16 20:57:42 -050046 recovery_map.decodeJPEGR(nullptr, nullptr, nullptr, false);
47}
48
49} // namespace android::recoverymap