1
Test class for Singleton1
- Construct 2 singleton1a objects using the instance method
- Check correctly initialised
- Set the data value of the first and print info. concerning both objects to the screen
- Check that the references and values for both objects are the same
- Construct 2 singleton1b objects using the instance method
- Check correctly initialised
- Set the data value of the last and print info. concerning all 4 objects to the screen
- Check that the references and values for all objects are the same
EXPECTED OUTPUT
Construct 2 singleton1a objects using the instance method
First singleton1a: p_singleton.Singleton1a@addbf1, data value = 0
Second singleton1a: p_singleton.Singleton1a@addbf1, data value = 0
Setting data value to 34
First singleton1a: p_singleton.Singleton1a@addbf1, data value = 34
Second singleton1a: p_singleton.Singleton1a@addbf1, data value = 34
Construct 2 singleton1b objects using the instance method
First singleton1b: p_singleton.Singleton1a@addbf1, data value = 34
Second singleton1b: p_singleton.Singleton1a@addbf1, data value = 34
Setting data value to 56
First singleton1b: p_singleton.Singleton1a@addbf1, data value = 56
Second singleton1b: p_singleton.Singleton1a@addbf1, data value = 56
First singleton1a: p_singleton.Singleton1a@addbf1, data value = 56
Second singleton1a: p_singleton.Singleton1a@addbf1, data value = 56