Sure, I can help you write a test case generator for the given problem statement "Old Bridges". To generate test cases, we'll need to consider the constraints and generate random values within those constraints. Here is a Python function that generates random test cases for the problem:

```python
import random

def tcgen():
    datasets = []
    
    while True:
        n = random.randint(1, 25)  # Random value for number of islands (1 ≤ n ≤ 25)
        
        if n == 0:
            break
        
        dataset = []
        for _ in range(n):
            treasures = random.randint(0, 100)  # Assuming a reasonable upper limit for treasures
            max_weight = random.randint(treasures, treasures + 100)  # Max weight should be at least as much as treasures
            
            dataset.append((treasures, max_weight))
        
        datasets.append(dataset)

    return datasets

# Example of how to use the generator and print the datasets
test_cases = tcgen()

for i, dataset in enumerate(test_cases):
    print(f"Dataset {i+1}:")
    print(len(dataset))
    for treasures, max_weight in dataset:
        print(treasures, max_weight)
```

This function generates multiple datasets. Each dataset contains:
1. An integer `n` representing the number of islands.
2. `n` pairs of integers, where each pair represents the amount of treasures on the island and the maximum weight that the bridge to the island can support.

To ensure the function terminates, we simulate the end of input by breaking the loop when `n == 0`. 

You can use this function to generate test cases for your problem. Adjust the ranges of random values for treasures and maximum weights if needed, depending on the specific requirements or constraints of your problem.