gecko-dev/security/pkix/test/gtest
Brian Smith 17375cc8b3 Bug 1036105: Delegate digest operations to the TrustDomain in mozilla::pkix, r=keeler
--HG--
extra : rebase_source : dd8dc1243ea2e37955a15f2481e1c452311e90d8
extra : histedit_source : adc1a2035d41c608d3f0ebe14bba159b2857502d
2014-07-06 19:36:05 -07:00
..
README.txt Bug 1035008, Part 1: Document naming convention for mozilla::pkix GTests, r=mmc 2014-07-06 15:59:08 -07:00
moz.build Bug 1035008, Part 2: Modify existing mozilla::pkix GTests to follow naming conventions, r=mmc 2014-07-05 22:14:25 -07:00
nssgtest.cpp Bug 1018642: Factor out reusable NSS GTest infrastructure into a new NSSTest class, r=cviecco 2014-05-30 16:46:49 -07:00
nssgtest.h Bug 1034636: Remove mozilla::pkix::ScopedCERTCertifciate and mozilla::pkix::ScopedPLArenaPool, r=mmc 2014-07-03 21:49:56 -07:00
pkixbuild_tests.cpp Bug 1036105: Delegate digest operations to the TrustDomain in mozilla::pkix, r=keeler 2014-07-06 19:36:05 -07:00
pkixcert_extension_tests.cpp Bug 1036105: Delegate digest operations to the TrustDomain in mozilla::pkix, r=keeler 2014-07-06 19:36:05 -07:00
pkixcheck_CheckKeyUsage_tests.cpp Bug 1035008, Part 2: Modify existing mozilla::pkix GTests to follow naming conventions, r=mmc 2014-07-05 22:14:25 -07:00
pkixcheck_CheckValidity_tests.cpp Bug 1035607 - Remove unused empty_null to fix -Wunused warning-as-error in security/pkix. r=briansmith 2014-07-07 20:37:21 -07:00
pkixder_input_tests.cpp Bug 1033092: Add unit tests for mozilla::pkix::der::ExpectTagAndGetValue, r=keeler 2014-07-01 16:28:45 -07:00
pkixder_pki_types_tests.cpp Bug 1036107, Part 1: Stop using CERTSignedData in mozilla::pkix, r=keeler 2014-07-10 19:00:32 -07:00
pkixder_universal_types_tests.cpp Bug 1029247, Part 2: Parse certificates using mozilla::pkix::der, r=keeler 2014-07-03 16:59:42 -07:00
pkixgtest.cpp Bug 1027255: Add ASSERT_/EXPECT_ GTest helpers for mozilla::pkix::Result, r=mmc 2014-06-18 23:40:34 -07:00
pkixgtest.h Bug 1027255: Add ASSERT_/EXPECT_ GTest helpers for mozilla::pkix::Result, r=mmc 2014-06-18 23:40:34 -07:00
pkixocsp_CreateEncodedOCSPRequest_tests.cpp Bug 1036105: Delegate digest operations to the TrustDomain in mozilla::pkix, r=keeler 2014-07-06 19:36:05 -07:00

README.txt

-------------
Running Tests
-------------

Because of the rules below, you can run all the unit tests in this directory,
and only these tests, with:

  mach gtest "pkix*"

You can run just the tests for functions defined in filename pkixfoo.cpp with:

  mach gtest "pkixfoo*"

If you run "mach gtest" then you'll end up running every gtest in Gecko.



------------
Naming Files
------------

Name files containing tests according to one of the following patterns:

  * <filename>_tests.cpp
  * <filename>_<Function>_tests.cpp
  * <filename>_<category>_tests.cpp

  <filename> is the name of the file containing the definitions of the
             function(s) being tested by every test.
  <Function> is the name of the function that is being tested by every
             test.
  <category> describes the group of related functions that are being
             tested by every test.



------------------------------------------------
Always Use a Fixture Class: TEST_F(), not TEST()
------------------------------------------------

Many tests don't technically need a fixture, and so TEST() could technically
be used to define the test. However, when you use TEST_F() instead of TEST(),
the compiler will not allow you to make any typos in the test case name, but
if you use TEST() then the name of the test case is not checked.

See https://code.google.com/p/googletest/wiki/Primer#Test_Fixtures:_Using_the_Same_Data_Configuration_for_Multiple_Te
to learn more about test fixtures.

---------------
Naming Fixtures
---------------

When all tests in a file use the same fixture, use the base name of the file
without the "_tests" suffix as the name of the fixture class; e.g. tests in
"pkixocsp.cpp" should use a fixture "class pkixocsp" by default.

Sometimes tests in a file need separate fixtures. In this case, name the
fixture class according to the pattern <fixture_base>_<fixture_suffix>, where
<fixture_base> is the base name of the file without the "_tests" suffix, and
<fixture_suffix> is a descriptive name for the fixture class, e.g.
"class pkixocsp_DelegatedResponder".