22 Commits

Author SHA1 Message Date
rhysd a52f0a026d Fix failure on running events tests in parallel 2021-12-29 21:21:00 +09:00
Guillaume Gomez 7fd7ee4447 run cargo fmt 2020-12-08 20:30:47 +01:00
Logan McGrath 44cf05a61b tests and docs 2020-01-30 12:15:59 -08:00
Edward Barnard b1823e0ca1 Add tests for EventSender behaviour when the event subsystem has been shut down. 2019-09-07 14:47:00 +03:00
Cobrand 1d5f701d0f Enable no_std for sdl2-sys 2019-03-23 15:04:53 +00:00
Giovanni Bajo edbe5df21e Fix test flakyness 2018-12-05 22:44:04 +01:00
Dario Ostuni b00e88962c Introducing bindgen 2017-08-30 23:16:51 +02:00
Cobrand f1a76882d6 Fix clippy errors: first pass 2017-05-03 09:15:54 +02:00
Cobrand ac87f8153a Fix travis with new display_name test 2017-05-02 09:03:02 +02:00
Cobrand 40a373c5ea Refactored tests/ and added test for VideoSubsys 2017-05-02 09:03:02 +02:00
Machtan 877bb42cbb Make all examples work and all tests pass after the error/rect changes 2016-02-11 21:15:31 +01:00
Maarten Hoogendoorn c2a4d53660 Implement type safe custom events 2016-02-04 02:50:36 +01:00
Maarten Hoogendoorn a9a6314deb Implement tests for registering custom events.
The change in src/sdl2/lib.rs to export the libc crate is necessary to
make sure that the downstream user can cast the data1 and data2 pointers
from/to custom pointers.

Also, the test harness is disabled for the tests/events.rs file, since
SDL can only be initialized once and doesn't support multithreading.
2016-02-04 00:27:40 +01:00
Dan Spencer 276f625fd4 Remove all get_ prefixes from getter methods 2015-08-11 19:25:12 -06:00
Dan Spencer 83b945e9a9 Add lifetime to RWops, coerce Paths, update audio/surface RWops fns
* `SDL_RWFromConstMem` and `SDL_RWFromMem` only references the
  buffer, and never copies it - ergo, lifetime.
* `AsRef<Path>` lets us use ordinary string slices as path arguments,
  like in `std::fs::File`.
2015-05-21 20:16:05 -06:00
Dan Spencer e32beaaa9a Replace AudioFormat constants with AudioFormat enum variants 2015-05-17 23:22:51 -06:00
Mathijs van de Nes 95d238072c Switch to new io 2015-03-16 20:46:32 +01:00
Nicholas Mazzuca ce9faaf17f Merge remote-tracking branch 'upstream/master' into fixed
Conflicts:
	examples/game_controller.rs
	examples/joystick.rs
	src/sdl2/sdl.rs
2015-02-23 01:41:49 -08:00
Nicholas Mazzuca 9ab8cfaf18 Fix compile and warnings, change to 0.0.28/0.0.27
* Change to crates.io rand in examples/whitenoise
* Change #[feature(io, path)] to #[feature(old_io, old_path)] everywhere
* Take away the `us` suffix everywhere
* Switch from `c_str_to_bytes` to `CStr::from_ptr(ptr).to_bytes()`
* Change from `CString::from_slice` to `CString::new`
    * If possible return a NulError when CString::new fails
    * Otherwise, unwrap
    * This can be changed (either way) if needed
* Switch from ContravariantLifetime to PhantomData
* Fixed some unused variable errors in tests
* Other minor changes
2015-02-23 01:09:17 -08:00
Dan Spencer 2a5ce5f1bf Add Sdl type 2015-02-21 21:42:58 -07:00
Alexander Campbell 3a143843d4 Add #![feature] tags to examples and tests 2015-02-01 15:34:22 -06:00
Dan Spencer 1e8c8475db Remove CVec from AudioSpecWAV, add integration test for AudioSpecWAV 2015-01-07 17:12:58 -06:00