Add C-API tests (#25886)

2 files changed