1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#![allow(non_snake_case, non_camel_case_types, unused_variables)]
#[cfg(feature="enable")]
mod generated;
#[cfg(feature="enable")]
pub use generated::*;
#[cfg(all(feature="enable", test))]
mod tests {
use super::*;
#[test]
fn emit_zone() {
unsafe {
___tracy_init_thread();
let srcloc = ___tracy_source_location_data {
name: b"name\0".as_ptr() as _,
function: b"function\0".as_ptr() as _,
file: b"file\0".as_ptr() as _,
line: 42,
color: 0,
};
let zone_ctx = ___tracy_emit_zone_begin(&srcloc, 1);
___tracy_emit_zone_end(zone_ctx);
}
}
#[test]
fn emit_message_no_null() {
unsafe {
___tracy_init_thread();
___tracy_emit_message(b"hello world".as_ptr() as _, 11, 1);
}
}
}