[DiscordArchive] at that point the functions you call should just hand you the resources and it'd be the same as AddS
[DiscordArchive] at that point the functions you call should just hand you the resources and it'd be the same as AddS
Archived author: <o> • Posted: 2022-09-11T17:42:24.804000+00:00
Original source
at that point the functions you call should just hand you the resources and it'd be the same as AddSC, no?
Archived author: Sovak • Posted: 2022-09-11T17:42:57.492000+00:00
Original source
But this could fully automate object leaking, if it works
Archived author: Sovak • Posted: 2022-09-11T17:43:09.475000+00:00
Original source
I would just need to call the "AddSC" function once
Archived author: <o> • Posted: 2022-09-11T17:45:46.547000+00:00
Original source
i'm not sure exactly what you're suggesting but generally you can't cause things to init or do anything before explicitly accessing them somewhere first, so your function would need to return those thing to whoever is accepting them
Archived author: <o> • Posted: 2022-09-11T17:46:32.988000+00:00
Original source
it's not just a linker issue, c++ standard allows implementations to ignore global variables completely until someone asks for them
Archived author: <o> • Posted: 2022-09-11T17:49:19.436000+00:00
Original source
but i'm assuming you're doing this for "auto-registering" test cases in the way i'm imagining
![[Image: unknown.png?ex=690c372b&is=690ae5ab&hm=4...2b77a7d8a&]](https://cdn.discordapp.com/attachments/376074396915335170/1018579325357916220/unknown.png?ex=690c372b&is=690ae5ab&hm=4c3a34f8f41f2c01256b6e61dc7cc2f278692b8e8d54a87fbf1ea1e2b77a7d8a&)
Archived author: Sovak • Posted: 2022-09-11T17:50:35.496000+00:00
Original source
This seems to work All you have to do is reference LeakTests() from the TU, which has a function, to run any test by the name
![[Image: unknown.png?ex=690c372b&is=690ae5ab&hm=4...2b77a7d8a&]](https://cdn.discordapp.com/attachments/376074396915335170/1018579325357916220/unknown.png?ex=690c372b&is=690ae5ab&hm=4c3a34f8f41f2c01256b6e61dc7cc2f278692b8e8d54a87fbf1ea1e2b77a7d8a&)
Archived author: <o> • Posted: 2022-09-11T17:50:55.813000+00:00
Original source
on msvc that will generally work, but it's udb
Archived author: Sovak • Posted: 2022-09-11T17:51:48.160000+00:00
Original source
How is it though? Getting the tests count requires the tests to be inserted, which is a side effect of the ctors
Archived author: Sovak • Posted: 2022-09-11T17:51:54.768000+00:00
Original source
So they are forced to be linked in