There has been a “moose test” used in European car testing for a very long time. In the US, it is known as an emergency double-lane-change test. It tests the cars stability and agility when moving over an entire lane to avoid, a moose (yes) or a stopped car or a sofa in the road, and return to the lane of travel.
Famously, some SUVs and the Smart Car popped up on 2 wheels during that maneuver. Others spun out during the return. Forced stability control on those cars as standard before it was mandated.
Any autonomous control would obviously need to recognize the obstacle, brake, steer and steer back. This has been demonstrated as far back as the 1990’s with car-sized obstacles, in clear weather.
The decision gets trickier when the obstacle varies… and there is where the human may make better decisions. What does the system do when confronted with no escape path and no distance to stop? Hit a dog or hit a kid? No one wants either but if it is me or the dog, the dog’s gonna lose (and I love dogs). I would risk my own death to save a kid. Tough choice for a computer.