1704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck/*
2704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck * Copyright (C) 2015 The Android Open Source Project
3704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck *
4704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck * Licensed under the Apache License, Version 2.0 (the "License");
5704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck * you may not use this file except in compliance with the License.
6704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck * You may obtain a copy of the License at
7704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck *
8704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck *      http://www.apache.org/licenses/LICENSE-2.0
9704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck *
10704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck * Unless required by applicable law or agreed to in writing, software
11704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck * distributed under the License is distributed on an "AS IS" BASIS,
12704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck * See the License for the specific language governing permissions and
14704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck * limitations under the License.
15704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck */
16704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck
1776caecf421b42e9b8294a65f62ff2d90b55a337bChris Craik#include <DeviceInfo.h>
18704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck
19704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck#include <gtest/gtest.h>
20704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck
21704bed0da7cc75d0c517d425445de70ceb58060bJohn Reckusing namespace android;
22704bed0da7cc75d0c517d425445de70ceb58060bJohn Reckusing namespace android::uirenderer;
23704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck
24704bed0da7cc75d0c517d425445de70ceb58060bJohn ReckTEST(DeviceInfo, basic) {
2576caecf421b42e9b8294a65f62ff2d90b55a337bChris Craik    // can't assert state before init - another test may have initialized the singleton
26704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck    DeviceInfo::initialize();
2776caecf421b42e9b8294a65f62ff2d90b55a337bChris Craik    const DeviceInfo* di = DeviceInfo::get();
28704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck    ASSERT_NE(nullptr, di) << "DeviceInfo initialization failed";
29704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck    EXPECT_EQ(2048, di->maxTextureSize()) << "Max texture size didn't match";
30704bed0da7cc75d0c517d425445de70ceb58060bJohn Reck}
31