omeryusufyagci / fast-music-remover

A C++ based, lightweight music and noise remover for YouTube and other internet media, using DeepFilterNet for audio enhancement.
MIT License
199 stars 21 forks source link

Testing: Add Unit Tests for MediaProcessor using Google Test #8 #36

Closed nikhiljangra264 closed 1 month ago

nikhiljangra264 commented 1 month ago

8

Summary

This PR introduces the Google Test (gtest) framework, a ConfigManagerTester.cpp test suite, and restructures the project with separate CMakeLists.txt files for source, tests, and the main project.

Changes

  1. Modular CMakeLists Structure

    • Created three separate CMakeLists.txt files for better project organization:
      • src/CMakeLists.txt: Handles the build configuration for the source code.
      • tests/CMakeLists.txt: Configures the build for test-related files, including the integration of gtest.
      • CMakeLists.txt: The main CMake file, fetch content and control the two other files.
  2. Add gtest Framework

    • Integrated gtest into the tests/CMakeLists.txt for unit testing.
  3. Add ConfigManagerTester

    • Introduced a ConfigManagerTester.cpp in the tests directory.
    • Currently check for proper reading of config.json file by ConfigManager.cpp
  4. Add ConfigFileCreator

    • Make a class TempConfigFile responsible for creating temporary config file to be used by tests
omeryusufyagci commented 1 month ago

Hey @nikhiljangra264 can you target this to 8-testing-add-unit-tests-for-mediaprocessor-using-google-test, thanks!

nikhiljangra264 commented 1 month ago

Done!

nikhiljangra264 commented 1 month ago

I added most of the test suits. Please tell me if any remains