Merge: gamnit: fix nitunit compatibility
authorJean Privat <jean@pryen.org>
Wed, 10 May 2017 13:20:50 +0000 (09:20 -0400)
committerJean Privat <jean@pryen.org>
Wed, 10 May 2017 13:20:50 +0000 (09:20 -0400)
commit74a4309d45e331f13e108703b90f5c2945ba5866
tree64c35e033c617e7f495fdf92cefb21cbfb5a31ae
parente215f15851603e7e8d8ea0e12784f54d12887d2d
parentf7121622dd5969875519008922b6498aa90b4036
Merge: gamnit: fix nitunit compatibility

Unit tests in the gamnit module were not executed because Sys::setup exited right away when detecting NIT_TESTING. It affected all gamnit games. This PR check is a platform is bound at the beginning of `Sys::main`, allowing unit tests to run (whether they redef `main` or not).

The check is made possible by the new `bound_platform` which tells what platform is currently bound. This value can be useful in some other cases.

This is an alternative to #2394.

Pull-Request: #2420
Reviewed-by: Jean Privat <jean@pryen.org>
lib/gamnit/flat.nit