Test Singleton Source

Unit tests for the Singleton class using GoogleTest.

This file contains unit tests to verify the correct behavior of the Singleton class. It ensures that only a single instance is created and that the provided methods work as expected.

Functions

TEST(SingletonTest, SingleInstance)

Test to verify that Singleton returns a single instance.

This test checks that the getInstance() method always returns the same instance of the Singleton class, ensuring the Singleton pattern is correctly implemented.

TEST(SingletonTest, DoSomething)

Test the functionality of the Singleton’s doSomething() method.

This test captures the standard output from the doSomething() method and verifies that the output matches the expected string.