Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DeaSTL committed Dec 21, 2023
1 parent 1ddbd06 commit 20443d9
Show file tree
Hide file tree
Showing 16 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ CPMAddPackage(
CPMAddPackage(
NAME nlohmann_json
GITHUB_REPOSITORY nlohmann/json
GIT_TAG origin/master
GIT_TAG v3.11.3
OPTIONS
"BUILD_STATIC_LIBS ON"
"JSON_BuildTests OFF"
Expand Down
1 change: 1 addition & 0 deletions src/Command/Actions/New.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <Frate/Wizards.hpp>
#include <Frate/Project.hpp>
#include <git2.h>
#include <Frate/Command/Actions/Help.hpp>

namespace Frate::Command::New {
using std::filesystem::path;
Expand Down
1 change: 1 addition & 0 deletions src/Test/Commands/Author/TestAddMultiple.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#ifdef TEST
#include <Frate/Test/Test.hpp>
#include <Frate/Project.hpp>


namespace Tests::Command {
Expand Down
2 changes: 1 addition & 1 deletion src/Test/Commands/Author/TestAddSingle.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifdef TEST
#include <Frate/Test/Test.hpp>

#include <Frate/Project.hpp>

namespace Tests::Command {
bool testAddAuthorSingle(std::string name){
Expand Down
2 changes: 1 addition & 1 deletion src/Test/Commands/Author/TestRemoveAuthor.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifdef TEST
#include <Frate/Test/Test.hpp>

#include <Frate/Project.hpp>

namespace Tests::Command {
bool testRemoveAuthor(std::string name){
Expand Down
2 changes: 1 addition & 1 deletion src/Test/Commands/Flags/TestAddFlagMultiple.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifdef TEST
#include <Frate/Test/Test.hpp>

#include <Frate/Project.hpp>

namespace Tests::Command {
bool testAddFlagsMultiple(){
Expand Down
2 changes: 1 addition & 1 deletion src/Test/Commands/Flags/TestAddFlagSingle.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifdef TEST
#include <Frate/Test/Test.hpp>

#include <Frate/Project.hpp>

namespace Tests::Command {
bool testAddFlagsSingle(){
Expand Down
1 change: 1 addition & 0 deletions src/Test/Commands/Flags/TestAddFlagWithMode.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#ifdef TEST
#include <Frate/Test/Test.hpp>
#include <Frate/Project.hpp>


namespace Tests::Command {
Expand Down
3 changes: 2 additions & 1 deletion src/Test/Commands/Mode/TestAddModeSingle.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifdef TEST
#include "Frate/Test/Test.hpp"
#include "nlohmann/json_fwd.hpp"
#ifdef TEST
#include <Frate/Project.hpp>

bool Tests::Command::testAddMode(std::string mode_name){
Frate::Utils::info << "Testing add mode command normal conditions" << std::endl;
Expand Down
2 changes: 2 additions & 0 deletions src/Test/Commands/New/TestWithLang.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifdef TEST
#include <Frate/Test/Test.hpp>
#include <Frate/Utils/General.hpp>
#include <Frate/Project.hpp>

bool Tests::Command::testNewWithLang(std::string lang){

Frate::Utils::info << "Testing new command with lang: " << lang << std::endl;
Expand Down
3 changes: 2 additions & 1 deletion src/Test/Commands/New/TestWithType.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifdef TEST
#include "Frate/Utils/General.hpp"
#include <Frate/Test/Test.hpp>
#include <Frate/Project.hpp>

bool Tests::Command::testNewWithType(std::string type){
Frate::Utils::info << "Testing new command with type: " << type << std::endl;
test_path = genTestDirectory();
Expand Down
2 changes: 1 addition & 1 deletion src/Test/Commands/Package/TestAddPackageMultiple.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifdef TEST
#include "Frate/Command.hpp"
#include <Frate/Test/Test.hpp>
#include <Frate/Project.hpp>

bool Tests::Command::testAddPackageMultiple(std::vector<std::string> packages) {
std::cout << "Testing add multiple packages : adding ";
Expand Down
2 changes: 2 additions & 0 deletions src/Test/Commands/Package/TestAddPackageWithMode.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#ifdef TEST
#include <Frate/Test/Test.hpp>
#include <Frate/Package.hpp>
#include <Frate/Project.hpp>
bool Tests::Command::testAddPackageToMode(std::string mode_name, std::string package_name){
using nlohmann::json;
std::cout << "Testing add package to mode command" << std::endl;
Expand Down
3 changes: 2 additions & 1 deletion src/Test/Commands/Package/TestRemovePackageMultiple.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifdef TEST
#include <Frate/Test/Test.hpp>

#include <Frate/Package.hpp>
#include <Frate/Project.hpp>

namespace Tests::Command {
bool testRemovePackageMultiple(std::vector<std::string> packages){
Expand Down
1 change: 1 addition & 0 deletions src/Test/Commands/TestCommandUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <Frate/Command.hpp>
#include <filesystem>
#include <memory>
#include <Frate/Project.hpp>

namespace Tests::Command {
using std::filesystem::path;
Expand Down
4 changes: 1 addition & 3 deletions src/Test/Commands/TestValidateProjectJson.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
#ifdef TEST
#include "Frate/Command.hpp"
#include "Frate/Utils/General.hpp"
#include <catch2/catch_test_macros.hpp>
#include <Frate/Test/Test.hpp>
#include <Frate/Project.hpp>


namespace Tests::Command {
using Frate::Command::Interface;
bool validateProjectJson(std::shared_ptr<Interface> inter){
Frate::Utils::Error error;
Frate::Utils::Info info;
bool valid = true;
Frate::Utils::info << "Testing valid project json" << std::endl;

Expand Down

0 comments on commit 20443d9

Please sign in to comment.