SVCS - English Documentation
Loading...
Searching...
No Matches
IndexTest.cxx File Reference

Unit tests for the Index class, verifying staging area management, file modification tracking, and index persistence. More...

#include "../../core/include/Index.hxx"
#include "../../core/include/Blob.hxx"
#include "../../core/include/ObjectStorage.hxx"
#include <gtest/gtest.h>
#include <filesystem>
#include <fstream>
#include <string>
#include <map>
#include <memory>
#include <thread>

Classes

class  svcs::test::core::MockSubject
 Mock implementation of ISubject (Event Bus). More...
class  svcs::test::core::MockObjectStorage
 Mock implementation of ObjectStorage. More...
class  svcs::test::core::IndexTest

Namespaces

namespace  svcs::test::core
 Unit tests for core components and data structures.
namespace  svcs::test
 Comprehensive testing framework for SVCS version control system.

Functions

void svcs::test::core::create_test_file (const fs::path &path, const std::string &content)
 svcs::test::core::TEST_F (IndexTest, BasicFileOperations)
 svcs::test::core::TEST_F (IndexTest, StageNewFile_AddsCorrectEntry)
 svcs::test::core::TEST_F (IndexTest, StageFile_ThrowsOnNonExistentFile)
 svcs::test::core::TEST_F (IndexTest, IsFileModified_False_WhenNoChange)
 svcs::test::core::TEST_F (IndexTest, IsFileModified_True_WhenSizeChanges)
 svcs::test::core::TEST_F (IndexTest, IsFileModified_True_WhenFileDeleted)
 svcs::test::core::TEST_F (IndexTest, IsFileModified_True_WhenUntrackedExists)
 svcs::test::core::TEST_F (IndexTest, Persistence_SaveAndLoad)

Detailed Description

Unit tests for the Index class, verifying staging area management, file modification tracking, and index persistence.