Internal Test: Verifies that the count updates correctly after Add() and Clear() operations, demonstrating the dynamic nature of the collection.

ID: 1032

				
					using uCalcSoftware;

var uc = new uCalc();
var t = new uCalc.Transformer();
var tokens = t.Tokens;

var initialCount = tokens.Count;
Console.WriteLine($"1. Initial count: {initialCount}");

// Add a new token
tokens.Add("custom_token");
Console.WriteLine($"2. Count after Add: {tokens.Count}");

// Clear all tokens
tokens.Clear();
Console.WriteLine($"3. Count after Clear: {tokens.Count}");

// Add one token back
tokens.Add(".");
Console.WriteLine($"4. Count after adding one back: {tokens.Count}");
				
			
1. Initial count: 27
2. Count after Add: 28
3. Count after Clear: 0
4. Count after adding one back: 1
				
					#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   uCalc::Transformer t;
   auto tokens = t.Tokens();

   auto initialCount = tokens.Count();
   cout << "1. Initial count: " << initialCount << endl;

   // Add a new token
   tokens.Add("custom_token");
   cout << "2. Count after Add: " << tokens.Count() << endl;

   // Clear all tokens
   tokens.Clear();
   cout << "3. Count after Clear: " << tokens.Count() << endl;

   // Add one token back
   tokens.Add(".");
   cout << "4. Count after adding one back: " << tokens.Count() << endl;
}
				
			
1. Initial count: 27
2. Count after Add: 28
3. Count after Clear: 0
4. Count after adding one back: 1
				
					Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      Dim t As New uCalc.Transformer()
      Dim tokens = t.Tokens
      
      Dim initialCount = tokens.Count
      Console.WriteLine($"1. Initial count: {initialCount}")
      
      '// Add a new token
      tokens.Add("custom_token")
      Console.WriteLine($"2. Count after Add: {tokens.Count}")
      
      '// Clear all tokens
      tokens.Clear()
      Console.WriteLine($"3. Count after Clear: {tokens.Count}")
      
      '// Add one token back
      tokens.Add(".")
      Console.WriteLine($"4. Count after adding one back: {tokens.Count}")
   End Sub
End Module
				
			
1. Initial count: 27
2. Count after Add: 28
3. Count after Clear: 0
4. Count after adding one back: 1