test_helpers.h 766 B

1234567891011121314151617181920212223242526
  1. /* Copyright (c) 2014-2016, The Tor Project, Inc. */
  2. /* See LICENSE for licensing information */
  3. #ifndef TOR_TEST_HELPERS_H
  4. #define TOR_TEST_HELPERS_H
  5. const char *get_yesterday_date_str(void);
  6. circuit_t * dummy_origin_circuit_new(int num_cells);
  7. /* Number of descriptors contained in test_descriptors.txt. */
  8. #define HELPER_NUMBER_OF_DESCRIPTORS 8
  9. void helper_setup_fake_routerlist(void);
  10. #define GET(path) "GET " path " HTTP/1.0\r\n\r\n"
  11. void connection_write_to_buf_mock(const char *string, size_t len,
  12. connection_t *conn, int zlib);
  13. int mock_tor_addr_lookup__fail_on_bad_addrs(const char *name,
  14. uint16_t family, tor_addr_t *out);
  15. extern const char TEST_DESCRIPTORS[];
  16. #endif