As I recall, the story begins with a boy and his parents talking about some test that the boy is going to take. His parents seem concerened, but try to hide it. Even more so when he promises to do his best. As the story continues, it is made clear that everyone has to take this test at a certain age. I'm not sure if the age is actually mentioned, but the boy and all his friends appeared to be late pre-teen or early teen. Perhaps 11-14.
The boy is taken to a test centre, where everyone is very friendly in an awkward way. He has to promise to answer truthfully and to the best of his ability to every question. My memories of how the test was adminstered are somewhat vague, but I think he sat by a computer terminal. Once the test is finished, a man enters and takes the boy out. In the last scene, his parents get a phone call about funeral arrangements. I'm not sure whether the termination is actually shown, or if the man just shows the boy out of the test room.
It is somehow made clear throughout the story, that intelligent people are seen as some kind of threat, though I don't remember any specific hints. It is also made clear that the boy is intelligent. But obviously he's not intelligent enough to see through the system and fool the test.
I saw this on TV some 30 years ago, and for some reason I came to think about it the other day, and I would like to see it again. It was a short story, probably an episode of a series of unrelated stories. If it is based on a written short story, I would also like to read it. I've tried googling for it, but I haven't come up with anything. Any clues would be much appreciated.