In order to avoid memory errors, I always write safe C++ wrappers with strong type-safety for any C encryption library I use.
To test my wrapper of crypto_secretbox_xsalsa20poly1305
of libsodium and make sure I'm using it correctly, I need a set of messages, nonces and keys that someone used and encrypted and the outcome of that. This is necessary for unit tests.
In OpenSSL, when I do that, I usually use the terminal, and pipe from the terminal to my unit tests and compare the output of my result.
There doesn't seem to be a terminal tool for libsodium. So I'm hoping there's either an online service that does this (take msg + nonce + key and produce cipher + mac), or someone here could provide a few test messages and their expected mac + cipher in hex.