Lines Matching refs:p1
28 struct sshbuf *p1; in sshbuf_misc_tests() local
36 p1 = sshbuf_new(); in sshbuf_misc_tests()
37 ASSERT_PTR_NE(p1, NULL); in sshbuf_misc_tests()
38 ASSERT_INT_EQ(sshbuf_put_u32(p1, 0x12345678), 0); in sshbuf_misc_tests()
39 sshbuf_dump(p1, out); in sshbuf_misc_tests()
49 sshbuf_free(p1); in sshbuf_misc_tests()
53 p1 = sshbuf_new(); in sshbuf_misc_tests()
54 ASSERT_PTR_NE(p1, NULL); in sshbuf_misc_tests()
55 ASSERT_INT_EQ(sshbuf_put_u32(p1, 0x12345678), 0); in sshbuf_misc_tests()
56 p = sshbuf_dtob16(p1); in sshbuf_misc_tests()
60 sshbuf_free(p1); in sshbuf_misc_tests()
64 p1 = sshbuf_new(); in sshbuf_misc_tests()
65 ASSERT_PTR_NE(p1, NULL); in sshbuf_misc_tests()
66 ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x11), 0); in sshbuf_misc_tests()
67 p = sshbuf_dtob64(p1); in sshbuf_misc_tests()
71 sshbuf_free(p1); in sshbuf_misc_tests()
75 p1 = sshbuf_new(); in sshbuf_misc_tests()
76 ASSERT_PTR_NE(p1, NULL); in sshbuf_misc_tests()
77 ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x11), 0); in sshbuf_misc_tests()
78 ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x22), 0); in sshbuf_misc_tests()
79 p = sshbuf_dtob64(p1); in sshbuf_misc_tests()
83 sshbuf_free(p1); in sshbuf_misc_tests()
87 p1 = sshbuf_new(); in sshbuf_misc_tests()
88 ASSERT_PTR_NE(p1, NULL); in sshbuf_misc_tests()
89 ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x11), 0); in sshbuf_misc_tests()
90 ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x22), 0); in sshbuf_misc_tests()
91 ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x33), 0); in sshbuf_misc_tests()
92 p = sshbuf_dtob64(p1); in sshbuf_misc_tests()
96 sshbuf_free(p1); in sshbuf_misc_tests()
100 p1 = sshbuf_new(); in sshbuf_misc_tests()
101 ASSERT_PTR_NE(p1, NULL); in sshbuf_misc_tests()
102 ASSERT_INT_EQ(sshbuf_reserve(p1, 8192, NULL), 0); in sshbuf_misc_tests()
103 bzero(sshbuf_mutable_ptr(p1), 8192); in sshbuf_misc_tests()
104 p = sshbuf_dtob64(p1); in sshbuf_misc_tests()
108 sshbuf_free(p1); in sshbuf_misc_tests()
112 p1 = sshbuf_new(); in sshbuf_misc_tests()
113 ASSERT_PTR_NE(p1, NULL); in sshbuf_misc_tests()
114 ASSERT_INT_EQ(sshbuf_b64tod(p1, "0A=="), 0); in sshbuf_misc_tests()
115 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 1); in sshbuf_misc_tests()
116 ASSERT_U8_EQ(*sshbuf_ptr(p1), 0xd0); in sshbuf_misc_tests()
117 sshbuf_free(p1); in sshbuf_misc_tests()
121 p1 = sshbuf_new(); in sshbuf_misc_tests()
122 ASSERT_PTR_NE(p1, NULL); in sshbuf_misc_tests()
123 ASSERT_INT_EQ(sshbuf_b64tod(p1, "0A8="), 0); in sshbuf_misc_tests()
124 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2); in sshbuf_misc_tests()
125 ASSERT_U16_EQ(PEEK_U16(sshbuf_ptr(p1)), 0xd00f); in sshbuf_misc_tests()
126 sshbuf_free(p1); in sshbuf_misc_tests()
130 p1 = sshbuf_new(); in sshbuf_misc_tests()
131 ASSERT_PTR_NE(p1, NULL); in sshbuf_misc_tests()
132 ASSERT_INT_EQ(sshbuf_b64tod(p1, "0A/QDw=="), 0); in sshbuf_misc_tests()
133 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 4); in sshbuf_misc_tests()
134 ASSERT_U32_EQ(PEEK_U32(sshbuf_ptr(p1)), 0xd00fd00f); in sshbuf_misc_tests()
135 sshbuf_free(p1); in sshbuf_misc_tests()
139 p1 = sshbuf_new(); in sshbuf_misc_tests()
140 ASSERT_PTR_NE(p1, NULL); in sshbuf_misc_tests()
142 p = sshbuf_dup_string(p1); in sshbuf_misc_tests()
147 ASSERT_INT_EQ(sshbuf_put(p1, "quad1", strlen("quad1")), 0); in sshbuf_misc_tests()
148 p = sshbuf_dup_string(p1); in sshbuf_misc_tests()
154 ASSERT_INT_EQ(sshbuf_put(p1, "\0", 1), 0); in sshbuf_misc_tests()
155 p = sshbuf_dup_string(p1); in sshbuf_misc_tests()
161 ASSERT_INT_EQ(sshbuf_put(p1, "quad2", strlen("quad2")), 0); in sshbuf_misc_tests()
162 p = sshbuf_dup_string(p1); in sshbuf_misc_tests()
164 sshbuf_free(p1); in sshbuf_misc_tests()