mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 03:58:21 +00:00
8370333: hotspot-unit-tests.md specifies wrong directory structure for tests
Reviewed-by: stefank, ayang
This commit is contained in:
parent
436b3357e9
commit
795ec5c1e9
@ -305,11 +305,11 @@ recognize your tests.</p>
|
|||||||
the product.</p>
|
the product.</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><p>All unit tests for a class from <code>foo/bar/baz.cpp</code>
|
<li><p>All unit tests for a class from <code>foo/bar/baz.cpp</code>
|
||||||
should be placed <code>foo/bar/test_baz.cpp</code> in
|
should be placed <code>foo/bar/test_baz.cpp</code> in the
|
||||||
<code>hotspot/test/native/</code> directory. Having all tests for a
|
<code>test/hotspot/gtest/</code> directory. Having all tests for a class
|
||||||
class in one file is a common practice for unit tests, it helps to see
|
in one file is a common practice for unit tests, it helps to see all
|
||||||
all existing tests at once, share functions and/or resources without
|
existing tests at once, share functions and/or resources without losing
|
||||||
losing encapsulation.</p></li>
|
encapsulation.</p></li>
|
||||||
<li><p>For tests which test more than one class, directory hierarchy
|
<li><p>For tests which test more than one class, directory hierarchy
|
||||||
should be the same as product hierarchy, and file name should reflect
|
should be the same as product hierarchy, and file name should reflect
|
||||||
the name of the tested subsystem/functionality. For example, if a
|
the name of the tested subsystem/functionality. For example, if a
|
||||||
@ -319,7 +319,7 @@ placed in <code>gc/g1</code> directory.</p></li>
|
|||||||
<p>Please note that framework prepends directory name to a test group
|
<p>Please note that framework prepends directory name to a test group
|
||||||
name. For example, if <code>TEST(foo, check_this)</code> and
|
name. For example, if <code>TEST(foo, check_this)</code> and
|
||||||
<code>TEST(bar, check_that)</code> are defined in
|
<code>TEST(bar, check_that)</code> are defined in
|
||||||
<code>hotspot/test/native/gc/shared/test_foo.cpp</code> file, they will
|
<code>test/hotspot/gtest/gc/shared/test_foo.cpp</code> file, they will
|
||||||
be reported as <code>gc/shared/foo::check_this</code> and
|
be reported as <code>gc/shared/foo::check_this</code> and
|
||||||
<code>gc/shared/bar::check_that</code>.</p>
|
<code>gc/shared/bar::check_that</code>.</p>
|
||||||
<h3 id="test-names">Test names</h3>
|
<h3 id="test-names">Test names</h3>
|
||||||
|
|||||||
@ -241,7 +241,7 @@ recognize your tests.
|
|||||||
Test file location should reflect a location of the tested part of the product.
|
Test file location should reflect a location of the tested part of the product.
|
||||||
|
|
||||||
* All unit tests for a class from `foo/bar/baz.cpp` should be placed
|
* All unit tests for a class from `foo/bar/baz.cpp` should be placed
|
||||||
`foo/bar/test_baz.cpp` in `hotspot/test/native/` directory. Having all
|
`foo/bar/test_baz.cpp` in the `test/hotspot/gtest/` directory. Having all
|
||||||
tests for a class in one file is a common practice for unit tests, it
|
tests for a class in one file is a common practice for unit tests, it
|
||||||
helps to see all existing tests at once, share functions and/or
|
helps to see all existing tests at once, share functions and/or
|
||||||
resources without losing encapsulation.
|
resources without losing encapsulation.
|
||||||
@ -254,7 +254,7 @@ sub-system under tests belongs to `gc/g1`, tests should be placed in
|
|||||||
|
|
||||||
Please note that framework prepends directory name to a test group
|
Please note that framework prepends directory name to a test group
|
||||||
name. For example, if `TEST(foo, check_this)` and `TEST(bar, check_that)`
|
name. For example, if `TEST(foo, check_this)` and `TEST(bar, check_that)`
|
||||||
are defined in `hotspot/test/native/gc/shared/test_foo.cpp` file, they
|
are defined in `test/hotspot/gtest/gc/shared/test_foo.cpp` file, they
|
||||||
will be reported as `gc/shared/foo::check_this` and
|
will be reported as `gc/shared/foo::check_this` and
|
||||||
`gc/shared/bar::check_that`.
|
`gc/shared/bar::check_that`.
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user