Sure! Below is a test case generator for the "A + B Problem". Since the input will be terminated by EOF, the generator will create a random number of pairs of integers within the given constraints:

```python
import random

def tcgen():
    # Define the number of test cases to generate (you can change this if needed)
    num_cases = random.randint(1, 100)  # random number of pairs for the test case
    cases = []

    for _ in range(num_cases):
        A = random.randint(-1000, 1000)
        B = random.randint(-1000, 1000)
        cases.append((A, B))
    
    return cases

def generate_input_output():
    cases = tcgen()
    input_data = ""
    output_data = ""
    
    for A, B in cases:
        input_data += f"{A} {B}\n"
        output_data += f"{A + B}\n"
    
    return input_data, output_data

# Example usage:
if __name__ == "__main__":
    input_data, output_data = generate_input_output()
    print("Generated Input:")
    print(input_data)
    print("Expected Output:")
    print(output_data)
```

### Explanation:
1. **tcgen Function**:
    - Generates a random number of test cases (between 1 and 100).
    - For each test case, generates a pair of integers \(A\) and \(B\) within the range [-1000, 1000].
    - Returns a list of these pairs.

2. **generate_input_output Function**:
    - Uses the `tcgen` function to generate test cases.
    - Constructs the input data as a string with each pair of integers on a new line.
    - Constructs the expected output data as a string with each sum on a new line.
    - Returns both the input data and the expected output data.

### Usage:
- The `generate_input_output` function can be used to obtain both the input and the expected output for the generated test cases. 
- This can be useful for testing the implementation of the problem in a competitive programming context.