In general, yes, I would agree that is a good test. There are some cases of basic research (e.g. pure mathematics, theoretical physics, theoretical computer science) that industry would not invest in because there is no immediate return. These can often lead to breakthroughs that enable applied research and useful technologies. However in these cases as you mentioned, it doesn't matter as much where the research happens since it will spread and can be used anywhere.
In general, yes, I would agree that is a good test. There are some cases of basic research (e.g. pure mathematics, theoretical physics, theoretical computer science) that industry would not invest in because there is no immediate return. These can often lead to breakthroughs that enable applied research and useful technologies. However in these cases as you mentioned, it doesn't matter as much where the research happens since it will spread and can be used anywhere.
If it was financially beneficial the private market would probably do it.