Skip to content

Commit

Permalink
test: Add Vector Type Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
F0bes committed Apr 6, 2024
1 parent 1399d0e commit 880dd98
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/branch-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ jobs:

- name: Build
run: cmake --build ${{github.workspace}}/build

- name: Test
run: cmake --build ${{github.workspace}}/build --target test
3 changes: 3 additions & 0 deletions .github/workflows/master-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ jobs:
- name: Build
run: cmake --build ${{github.workspace}}/build

- name: Test
run: cmake --build ${{github.workspace}}/build --target test

- name: Create Release
uses: softprops/action-gh-release@v1
if: steps.tag_version.outputs.new_tag
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
cmake_minimum_required(VERSION 3.12)

project(gifscript CXX C)
cmake_minimum_required(VERSION 3.22)

set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
project(gifscript CXX C)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR})

find_package(RAGEL REQUIRED)
Expand Down
4 changes: 2 additions & 2 deletions core/include/types.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once
#include <cstdint>
#include <stdexcept>
#include <string>
#include <vector>
#include <fmt/format.h>
#include <bit>

static std::vector<std::string> vec_split(const std::string& s)
{
Expand Down
5 changes: 4 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
set(CMAKE_CXX_CLANG_TIDY "")

cmake_policy(SET CMP0135 NEW)
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.24)
cmake_policy(SET CMP0135 NEW)
endif()

FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
Expand Down
2 changes: 1 addition & 1 deletion tests/type_tests.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <gtest/gtest.h>
#include <memory>

#include <bit>
#include "types.hpp"


Expand Down

0 comments on commit 880dd98

Please sign in to comment.