1/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. 2 3Licensed under the Apache License, Version 2.0 (the "License"); 4you may not use this file except in compliance with the License. 5You may obtain a copy of the License at 6 7 http://www.apache.org/licenses/LICENSE-2.0 8 9Unless required by applicable law or agreed to in writing, software 10distributed under the License is distributed on an "AS IS" BASIS, 11WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12See the License for the specific language governing permissions and 13limitations under the License. 14==============================================================================*/ 15 16#import <XCTest/XCTest.h> 17 18#include "tensorflow/lite/delegates/gpu/common/status.h" 19#include "tensorflow/lite/delegates/gpu/common/tasks/concat_test_util.h" 20#include "tensorflow/lite/delegates/gpu/metal/kernels/test_util.h" 21 22@interface ConcatTest : XCTestCase 23@end 24 25@implementation ConcatTest { 26 tflite::gpu::metal::MetalExecutionEnvironment exec_env_; 27} 28 29- (void)testConcatWidth { 30 auto status = ConcatWidthTest(&exec_env_); 31 XCTAssertTrue(status.ok(), @"%s", std::string(status.message()).c_str()); 32} 33 34- (void)testConcatHeight { 35 auto status = ConcatHeightTest(&exec_env_); 36 XCTAssertTrue(status.ok(), @"%s", std::string(status.message()).c_str()); 37} 38 39- (void)testConcatChannels { 40 auto status = ConcatChannelsTest(&exec_env_); 41 XCTAssertTrue(status.ok(), @"%s", std::string(status.message()).c_str()); 42} 43 44- (void)testConcatChannelsAlignedx4 { 45 auto status = ConcatChannelsAlignedx4Test(&exec_env_); 46 XCTAssertTrue(status.ok(), @"%s", std::string(status.message()).c_str()); 47} 48 49@end 50