# Copyright (c) Facebook, Inc. and its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
add_subdirectory(utils)

add_executable(
  velox_vector_test
  VectorCompareTest.cpp
  VectorSaverTest.cpp
  VectorMakerTest.cpp
  VectorPoolTest.cpp
  VectorPrinterTest.cpp
  VectorTest.cpp
  VectorStreamTest.cpp
  VectorToStringTest.cpp
  VectorEstimateFlatSizeTest.cpp
  VectorPrepareForReuseTest.cpp
  DecodedVectorTest.cpp
  SelectivityVectorTest.cpp
  EnsureWritableVectorTest.cpp
  IsWritableVectorTest.cpp
  LazyVectorTest.cpp
  MayHaveNullsRecursiveTest.cpp
  VariantToVectorTest.cpp
  VectorTestUtils.cpp)

add_test(velox_vector_test velox_vector_test)

target_link_libraries(
  velox_vector_test
  velox_vector_test_lib
  velox_buffer
  velox_vector
  velox_serialization
  velox_memory
  velox_presto_serializer
  velox_presto_types
  velox_temp_path
  velox_vector_fuzzer
  Boost::atomic
  Boost::context
  Boost::date_time
  Boost::filesystem
  Boost::program_options
  Boost::regex
  Boost::thread
  Boost::system
  gtest
  gtest_main
  Folly::folly
  gflags::gflags
  glog::glog
  fmt::fmt
  dl)

add_executable(simple_vector_test SimpleVectorTest.cpp ToStringUtilityTest.cpp)

add_test(simple_vector_test simple_vector_test)

target_link_libraries(
  simple_vector_test
  velox_vector
  velox_buffer
  velox_type
  velox_vector_test_lib
  gtest
  gtest_main
  Folly::folly
  gflags::gflags
  glog::glog
  fmt::fmt)

add_executable(bias_vector_test BiasVectorTest.cpp)

add_test(bias_vector_test bias_vector_test)

target_link_libraries(
  bias_vector_test
  velox_vector
  Boost::filesystem
  gtest
  gtest_main
  Folly::folly
  gflags::gflags
  glog::glog
  fmt::fmt)
