Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed7d193a authored by Dan Albert's avatar Dan Albert
Browse files

Some more test cleanup.

Needed to build successfully when libc++ is the default STL.

Also fix a missing include. Not sure how this was getting by before.
Probably some transitive include.

Change-Id: Ie96b79e96b4e154d786fbf2d5ae5cf5892608837
parent e9034b45
Loading
Loading
Loading
Loading
+32 −27
Original line number Original line Diff line number Diff line
# Build the unit tests.
#
LOCAL_PATH := $(call my-dir)
# Copyright (C) 2014 The Android Open Source Project
include $(CLEAR_VARS)
#

# Licensed under the Apache License, Version 2.0 (the "License");
# Build the unit tests.
# you may not use this file except in compliance with the License.
test_src_files := \
# You may obtain a copy of the License at
    Region_test.cpp \
#
    vec_test.cpp \
#      http://www.apache.org/licenses/LICENSE-2.0
    mat_test.cpp
#

# Unless required by applicable law or agreed to in writing, software
shared_libraries := \
# distributed under the License is distributed on an "AS IS" BASIS,
    libutils \
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    libui
# See the License for the specific language governing permissions and
# limitations under the License.
#


static_libraries := \
LOCAL_PATH := $(call my-dir)
    libgtest \
    libgtest_main


$(foreach file,$(test_src_files), \
include $(CLEAR_VARS)
    $(eval include $(CLEAR_VARS)) \
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
    $(eval LOCAL_SHARED_LIBRARIES := $(shared_libraries)) \
LOCAL_SHARED_LIBRARIES := libui
    $(eval LOCAL_STATIC_LIBRARIES := $(static_libraries)) \
LOCAL_SRC_FILES := Region_test.cpp
    $(eval LOCAL_SRC_FILES := $(file)) \
LOCAL_MODULE := Region_test
    $(eval LOCAL_MODULE := $(notdir $(file:%.cpp=%))) \
include $(BUILD_NATIVE_TEST)
    $(eval include $(BUILD_NATIVE_TEST)) \
)


# Build the unit tests.
include $(CLEAR_VARS)
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_SRC_FILES := vec_test.cpp
LOCAL_MODULE := vec_test
include $(BUILD_NATIVE_TEST)


# Build the manual test programs.
include $(CLEAR_VARS)
include $(call all-makefiles-under, $(LOCAL_PATH))
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_SRC_FILES := mat_test.cpp
LOCAL_MODULE := mat_test
include $(BUILD_NATIVE_TEST)
+4 −3
Original line number Original line Diff line number Diff line
@@ -16,17 +16,18 @@


#define LOG_TAG "RegionTest"
#define LOG_TAG "RegionTest"


#include <math.h>
#include <stdlib.h>
#include <stdlib.h>

#include <ui/Region.h>
#include <ui/Region.h>
#include <ui/Rect.h>
#include <ui/Rect.h>
#include <gtest/gtest.h>

#include <ui/vec4.h>
#include <ui/vec4.h>


#include <gtest/gtest.h>

namespace android {
namespace android {


class VecTest : public testing::Test {
class VecTest : public testing::Test {
protected:
};
};


TEST_F(VecTest, Basics) {
TEST_F(VecTest, Basics) {