v2 / vlib / net / openssl / openssl_compiles_test.c.v
13 lines · 11 sloc · 257 bytes · a80bc2331450fc28c900097f8afafe173f161d27
Raw
1// vtest build: present_openssl?
2import net.openssl as _
3
4struct Abc {
5 x &C.SSL_CTX
6}
7
8fn test_printing_struct_with_reference_field_of_type_ssl_ctx() {
9 a := unsafe { Abc{&C.SSL_CTX(123)} }
10 dump(a)
11 sa := a.str()
12 assert sa.contains('&C.SSL_CTX(0x7b)')
13}
14