package profile_tests import profile "../../profile" import "core:strings" import "core:testing" @(test) test_profile_json_is_valid_object_shape :: proc(t: ^testing.T) { json := profile.to_json({frame_count = 3, draw_indexed_calls = 2}) defer delete(json) testing.expect(t, strings.has_prefix(json, "{")) testing.expect(t, strings.has_suffix(json, "}")) testing.expect(t, strings.contains(json, `"frame_count":3`)) testing.expect(t, strings.contains(json, `"app_frame_count":0`)) testing.expect(t, strings.contains(json, `"app_wall_seconds":0.000000000`)) testing.expect(t, strings.contains(json, `"draw_indexed_calls":2`)) }