module_noserver.c File Reference

Non connection oriented tests. More...

Macros

#define RTF_COMPRESSED1_HEX   "2d0000002b0000004c5a4675f1c5c7a703000a007263706731323542320af32068656c090020627705b06c647d0a800fa0"
 
#define RTF_COMPRESSED2_HEX   "1a0000001c0000004c5a4675e2d44b51410004205758595a0d6e7d010eb0"
 
#define RTF_UNCOMPRESSED1   "{\\rtf1\\ansi\\ansicpg1252\\pard hello world}\r\n"
 
#define RTF_UNCOMPRESSED2   "{\\rtf1 WXYZWXYZWXYZWXYZWXYZ}"
 
#define SROWSET_TAGGED   "01004d542044756d6d792046726f6d000a0f010480004d542044756d6d792046726f6d00426f6479206f66206d657373616765203500004d542044756d6d792046726f6d00426f6479206f66206d657373616765203600004d542044756d6d792046726f6d00426f6479206f66206d657373616765203700004d542044756d6d792046726f6d00426f6479206f66206d657373616765203800004d542044756d6d792046726f6d00426f6479206f66206d65737361676520390001004d542044756d6d7930000a0f010480004d542044756d6d793000426f6479206f66206d65737361676520300001004d542044756d6d7931000a0f010480004d542044756d6d793100426f6479206f66206d65737361676520310001004d542044756d6d7932000a0f010480004d542044756d6d793200426f6479206f66206d65737361676520320001004d542044756d6d7933000a0f010480004d542044756d6d793300426f6479206f66206d65737361676520330001004d542044756d6d7934000a0f010480004d542044756d6d793400426f6479206f66206d657373616765203400"
 
#define SROWSET_TAGGED_LEN   416
 
#define SROWSET_UNTAGGED   "004d542044756d6d792046726f6d00426f6479206f66206d657373616765203800004d542044756d6d792046726f6d00426f6479206f66206d657373616765203900004d542044756d6d792046726f6d00426f6479206f66206d657373616765203700004d542044756d6d792046726f6d00426f6479206f66206d657373616765203600004d542044756d6d793400426f6479206f66206d657373616765203400004d542044756d6d792046726f6d00426f6479206f66206d657373616765203500004d542044756d6d793300426f6479206f66206d657373616765203300004d542044756d6d793100426f6479206f66206d657373616765203100004d542044756d6d793200426f6479206f66206d657373616765203200004d542044756d6d793000426f6479206f66206d657373616765203000"
 
#define SROWSET_UNTAGGED_LEN   310
 

Functions

bool mapitest_noserver_lzfu (struct mapitest *mt)
 
bool mapitest_noserver_mapi_properties (struct mapitest *mt)
 
bool mapitest_noserver_properties (struct mapitest *mt)
 
bool mapitest_noserver_proptagvalue (struct mapitest *mt)
 
bool mapitest_noserver_rtfcp (struct mapitest *mt)
 
bool mapitest_noserver_rtfcp_large (struct mapitest *mt)
 
bool mapitest_noserver_srowset (struct mapitest *mt)
 

Detailed Description

Non connection oriented tests.

Macro Definition Documentation

#define RTF_COMPRESSED1_HEX   "2d0000002b0000004c5a4675f1c5c7a703000a007263706731323542320af32068656c090020627705b06c647d0a800fa0"
#define RTF_COMPRESSED2_HEX   "1a0000001c0000004c5a4675e2d44b51410004205758595a0d6e7d010eb0"
#define RTF_UNCOMPRESSED1   "{\\rtf1\\ansi\\ansicpg1252\\pard hello world}\r\n"
#define RTF_UNCOMPRESSED2   "{\\rtf1 WXYZWXYZWXYZWXYZWXYZ}"
#define SROWSET_TAGGED   "01004d542044756d6d792046726f6d000a0f010480004d542044756d6d792046726f6d00426f6479206f66206d657373616765203500004d542044756d6d792046726f6d00426f6479206f66206d657373616765203600004d542044756d6d792046726f6d00426f6479206f66206d657373616765203700004d542044756d6d792046726f6d00426f6479206f66206d657373616765203800004d542044756d6d792046726f6d00426f6479206f66206d65737361676520390001004d542044756d6d7930000a0f010480004d542044756d6d793000426f6479206f66206d65737361676520300001004d542044756d6d7931000a0f010480004d542044756d6d793100426f6479206f66206d65737361676520310001004d542044756d6d7932000a0f010480004d542044756d6d793200426f6479206f66206d65737361676520320001004d542044756d6d7933000a0f010480004d542044756d6d793300426f6479206f66206d65737361676520330001004d542044756d6d7934000a0f010480004d542044756d6d793400426f6479206f66206d657373616765203400"
#define SROWSET_TAGGED_LEN   416
#define SROWSET_UNTAGGED   "004d542044756d6d792046726f6d00426f6479206f66206d657373616765203800004d542044756d6d792046726f6d00426f6479206f66206d657373616765203900004d542044756d6d792046726f6d00426f6479206f66206d657373616765203700004d542044756d6d792046726f6d00426f6479206f66206d657373616765203600004d542044756d6d793400426f6479206f66206d657373616765203400004d542044756d6d792046726f6d00426f6479206f66206d657373616765203500004d542044756d6d793300426f6479206f66206d657373616765203300004d542044756d6d793100426f6479206f66206d657373616765203100004d542044756d6d793200426f6479206f66206d657373616765203200004d542044756d6d793000426f6479206f66206d657373616765203000"
#define SROWSET_UNTAGGED_LEN   310

Function Documentation

bool mapitest_noserver_lzfu ( struct mapitest mt)

Test the Compressed RTF decompression routine.

This function:

  1. Loads some test data and checks it
  2. Decompresses the test data
  3. Checks that the decompressed data matches the expected result
Parameters
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print(), mapitest_print_retval(), mapitest::mem_ctx, RTF_COMPRESSED1_HEX, RTF_COMPRESSED2_HEX, RTF_UNCOMPRESSED1, and RTF_UNCOMPRESSED2.

Referenced by module_noserver_init().

bool mapitest_noserver_mapi_properties ( struct mapitest mt)

Test the mapi_SPropValue_array handling

This function:

  1. Builds a mapi_SPropValue_array
  2. Checks that appropriate values can be retrieved
Parameters
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print(), and mapitest::mem_ctx.

Referenced by module_noserver_init().

bool mapitest_noserver_properties ( struct mapitest mt)

Test the property setter / getter code

This function:

  1. Checks setting / getting on an SPropValue
Parameters
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

Referenced by module_noserver_init().

bool mapitest_noserver_proptagvalue ( struct mapitest mt)

Test the get_proptag_value() function

This function:

  1. Checks the first value in the list
  2. Checks a random value from the list
  3. Checks the last value in the list
  4. Checks a value that doesn't exist
Parameters
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print().

Referenced by module_noserver_init().

bool mapitest_noserver_rtfcp ( struct mapitest mt)

Test the Compressed RTF compression routine.

This function:

  1. Loads some test data and checks it
  2. Compresses the test data
  3. Checks that the compressed data matches the expected result
Parameters
mtpointer to the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print(), mapitest_print_retval(), mapitest::mem_ctx, RTF_COMPRESSED1_HEX, RTF_COMPRESSED2_HEX, RTF_UNCOMPRESSED1, and RTF_UNCOMPRESSED2.

Referenced by module_noserver_init().

bool mapitest_noserver_rtfcp_large ( struct mapitest mt)

Test the Compressed RTF compression / decompression routines on a larger file

Parameters
mtpointer to the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print(), mapitest_print_retval_clean(), and mapitest::mem_ctx.

Referenced by module_noserver_init().

bool mapitest_noserver_srowset ( struct mapitest mt)

Test the SRowSet parsing / assembly code

This function:

  1. Loads some test data and checks it
  2. Parses the test data
  3. Checks that the parsed data matches the expected result
Parameters
mtpointer on the top-level mapitest structure
Returns
true on success, otherwise false

References mapitest_print().

Referenced by module_noserver_init().


Creative Commons License
Creative Commons Attribution icon Creative Commons Share Alike icon
This content is licensed under the Creative Commons
Attribution ShareAlike License v. 3.0:
http://creativecommons.org/licenses/by-sa/3.0/