SciLexer: Change project configuration to enable Google Test
Reported by Thell Fowler | January 29th, 2010 @ 10:22 PM | in v2.0.0
As we start to do more actual feature enhancements to the N++ code and possible changes to SciLexer base we will need to have the ability to test things in SciLexer.
This will be done using the same approach that Google uses for testing their .dll
In order to have SciLexer use the user's settings for Gtest and Gmock the way that the PowerEditor project does a new 'Common' folder will be created at the solution level instead of duplicating files and creating two edit points and failure points for future changes.
Comments and changes to this ticket
-
Thell Fowler January 30th, 2010 @ 09:48 PM
- State changed from new to open
- Assigned user set to Thell Fowler
-
Thell Fowler January 30th, 2010 @ 10:05 PM
- State changed from open to needs_ack
- Assigned user changed from Thell Fowler to npp-community
Pushed for ack:
http://github.com/almostautomated/npp-community/commit/56efc293d092...
projects: introduce console app for SciLexer tests
-
SciLexer-gtest-main.exe executes tests for SciLexer, it uses the same precompiled header as the SciLexer project. Adding tests is done the same way as for PowerEditor except you use a header instead of source file.
-
The project uses the same vsprop sheets defining gtest and mock paths as the PowerEditor project, and is setup to execute after debug and release builds.
[#35]
-
Thell Fowler February 3rd, 2010 @ 03:46 AM
(from [b163e1663017c15f8ae6c570fafb8945d1d992a4]) projects: introduce console app for SciLexer tests
-
SciLexer-gtest-main.exe executes tests for SciLexer, it uses the same precompiled header as the SciLexer project. Adding tests is done the same way as for PowerEditor except you use a header instead of source file.
-
The project uses the same vsprop sheets defining gtest and mock paths as the PowerEditor project, and is setup to execute after debug and release builds.
[#35] http://github.com/almostautomated/npp-community/commit/b163e1663017...
-
-
Jocelyn Legault February 16th, 2010 @ 08:03 PM
This implementation has many things wrong with it:
- The tests are in a header file for no obvious reasons. They should be in a .cpp file.
- You are using the precompiled header from another project, which in itself is quite wrong.
- The tests are part of the test app where they should be part of the tested DLL.
- The right pattern should be to have a generic test runner to which you pass a DLL path in parameter and the runner would then run it. This is way more versatile and flexible. We'd also would not have to compile a 3rd project every time.
Let me see if I can whip something up quickly to show you what I mean.
-
Jocelyn Legault February 17th, 2010 @ 12:58 AM
(from [848b8c7c80ef432d7cf779922a599ef6f4c6eddb]) Rough idea for a test runner for DLLs
THIS CODE IS NOT MEANT FOR PRODUCTION
This is a very rough example of what I have in mind for a test runner. It will probably not compile on other devs machines because of the hard coded paths for GTest and GMock.
There's also the problem that the tests from the DLL don't appear to load, which is a major issue. I've sent a question on the GTest mailing list to that regard.However, it shows the general idea I have in mind for a generic test runner that could take any GTested DLL and run the tests for it.
Note that I would NOT include the TestRunner in the final solution. This is just there for quickness sake.
[#35]
Signed-off-by: Jocelyn Legault jocelynlegault@gmail.com
http://github.com/joce/npp-community/commit/848b8c7c80ef432d7cf7799... -
Jocelyn Legault February 17th, 2010 @ 08:16 PM
(from [5ac4ba89aeef6abe53cee184718e3b42ccd46f3c]) Test runner proof-of-concept.
Here's a working proof of concept for a generic test runner.
It requires a little bit of code in the tested DLL, but that
could be provided as part of a SDK (for plugins, for example).
It also requires to make sure that the function is exported.
In this example, I had to modify the .def to do that. I think
that in general, you don't need that and __declspec(dllexport)
are always exported.[#35]
Signed-off-by: Jocelyn Legault jocelynlegault@gmail.com
http://github.com/joce/npp-community/commit/5ac4ba89aeef6abe53cee18... -
Jocelyn Legault February 19th, 2010 @ 12:19 AM
(from [9e5b43dad568a0cfe8789d2db741ccc3dfba0147]) Project cleanup:
- Removed (useless) gtest_main.lib and gmock_main.lib dependencies from the projects.
[#35]
Signed-off-by: Jocelyn Legault jocelynlegault@gmail.com
http://github.com/joce/npp-community/commit/9e5b43dad568a0cfe8789d2... -
Thell Fowler February 20th, 2010 @ 12:43 AM
(from [80198b57d823b6d1a79a1994fec014b9f04edab1]) scintilla project: alter post-build test script
- Altered the post build event that starts gtest to take advantage of the ENV_LIB_PATHS and SM_LIB_PATHS environment variables setup by the LIBS_PATHS vsprops sheet. It also now executes the correct gtest_runner using the same path as the lib notepad++ linked against.
This eliminates a false positive of not having the test runner run at all using the IF EXIST that was previously being used.
[#35]
Signed-off-by: Thell Fowler git@tbfowler.name
http://github.com/almostautomated/npp-community/commit/80198b57d823... -
Thell Fowler February 20th, 2010 @ 12:45 AM
(from [3cf541b3e776932e74a0245a4d09f891e7ffe9bf]) scintilla project: alter post-build test script
- Altered the post build event that starts gtest to take advantage of the ENV_LIB_PATHS and SM_LIB_PATHS environment variables setup by the LIBS_PATHS vsprops sheet. It also now executes the correct gtest_runner using the same path as the lib notepad++ linked against.
This eliminates a false positive of not having the test runner run at all using the IF EXIST that was previously being used.
[#35]
Signed-off-by: Thell Fowler git@tbfowler.name
http://github.com/almostautomated/npp-community/commit/3cf541b3e776... -
Thell Fowler February 20th, 2010 @ 05:15 AM
- State changed from needs_ack to open
- Assigned user changed from npp-community to Thell Fowler
I apologize for not noticing this earlier, yet it seems this topic branch was based on on a work in progress branch the almost every test topic in it. I'll fix it up and resubmit.
-
Thell Fowler February 20th, 2010 @ 07:12 AM
(from [cda81313a82bb08b39da3a6507d8b4891bad15be]) Scintilla: introduce setup for unit tests.
-
Maintainer's note: This is a manual recreation of a few patches from a topic branch with many unrelated patches...
-
Implementation of the gtest_runner.exe utility that is introduced in the jl/LH-35/micro-test-runner branch of the N++CR repo of gtest.
-
Project cleanup: Removed (useless) gtest_main.lib and gmock_main.lib dependencies from the projects.
[#35]
Signed-off-by: Jocelyn Legault jocelynlegault@gmail.com
Signed-off-by: Thell Fowler git@tbfowler.name
http://github.com/almostautomated/npp-community/commit/cda81313a82b... -
-
Thell Fowler February 20th, 2010 @ 07:12 AM
(from [a554ace063f584d65189b909e786bb1bf12f2d42]) scintilla project: alter post-build test script
-
Altered the post build event that starts gtest to take advantage of the ENV_LIB_PATHS and SM_LIB_PATHS environment variables setup by the LIBS_PATHS vsprops sheet. It also now executes the correct gtest_runner using the same path as the lib notepad++ linked against.
-
Requires gtest branch jl/LH-4v2/introduce-dll-test-runner-app
[#35]
Signed-off-by: Thell Fowler git@tbfowler.name
http://github.com/almostautomated/npp-community/commit/a554ace063f5... -
-
Thell Fowler February 20th, 2010 @ 07:16 AM
- State changed from open to needs_ack
- Assigned user changed from Thell Fowler to Jocelyn Legault
Topic is now based upon next (which required the least cherry-picking).
I had to squash your commits Joce, but re-committed using your ID and timestamp. That commit is slightly different and the message has been altered to reflect that there is no 'removal' of a previous patch.
Let me know if you have any questions on it.
-
Jocelyn Legault February 22nd, 2010 @ 10:15 PM
- State changed from needs_ack to acked
-
Thell Fowler February 27th, 2010 @ 06:04 AM
- Assigned user changed from Jocelyn Legault to npp-community
- State changed from acked to candidate
Promoted
Merge branch 'tf/LH-35v4/scintilla-setup-for-testing' into next
- tf/LH-35v4/scintilla-setup-for-testing: scintilla project: alter post-build test script Scintilla: introduce setup for unit tests. http://github.com/npp-community/npp-community/commit/acd9d584168834...
Committed by Thell Fowler
-
Thell Fowler October 29th, 2010 @ 11:03 PM
(from [b336e8415a6fc28e13cadc766a5056343d473144]) scintilla project: alter post-build test script
-
Altered the post build event that starts gtest to take advantage of the ENV_LIB_PATHS and SM_LIB_PATHS environment variables setup by the LIBS_PATHS vsprops sheet. It also now executes the correct gtest_runner using the same path as the lib notepad++ linked against.
-
Requires gtest branch jl/LH-4v2/introduce-dll-test-runner-app
[#35]
Signed-off-by: Thell Fowler git@tbfowler.name
http://github.com/npp-community/npp-community/commit/b336e8415a6fc2... -
-
npp-community October 29th, 2010 @ 11:03 PM
(from [01609c5feac5d200e7b946245b0c106816e8666c]) Scintilla: introduce setup for unit tests.
-
Maintainer's note: This is a manual recreation of a few patches from a topic branch with many unrelated patches...
-
Implementation of the gtest_runner.exe utility that is introduced in the jl/LH-35/micro-test-runner branch of the N++CR repo of gtest.
-
Project cleanup: Removed (useless) gtest_main.lib and gmock_main.lib dependencies from the projects.
[#35]
Signed-off-by: Jocelyn Legault jocelynlegault@gmail.com
Signed-off-by: Thell Fowler git@tbfowler.name
http://github.com/npp-community/npp-community/commit/01609c5feac5d2... -
-
Thell Fowler October 29th, 2010 @ 11:19 PM
- State changed from candidate to resolved
Merged to master.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Notepad++ Community Release
People watching this ticket
Referenced by
- 35 SciLexer: Change project configuration to enable Google Test [#35]
- 35 SciLexer: Change project configuration to enable Google Test [#35] http://github.com/almostautomated/npp-community/co...
- 35 SciLexer: Change project configuration to enable Google Test [#35]
- 35 SciLexer: Change project configuration to enable Google Test [#35]
- 35 SciLexer: Change project configuration to enable Google Test [#35]
- 35 SciLexer: Change project configuration to enable Google Test [#35]
- 35 SciLexer: Change project configuration to enable Google Test [#35]
- 35 SciLexer: Change project configuration to enable Google Test [#35]
- 35 SciLexer: Change project configuration to enable Google Test [#35]
- 42 [Enhancement] Add Shipping configuration to Scintilla This is a cherry-pick of 56362f8 from [#32] because [#35]...
- 42 [Enhancement] Add Shipping configuration to Scintilla Rather than alter #35 to include this patch and #32 to ex...
- 42 [Enhancement] Add Shipping configuration to Scintilla Rather than alter #35 to include this patch and #32 to ex...
- 42 [Enhancement] Add Shipping configuration to Scintilla Rather than alter #35 to include this patch and #32 to ex...
- 35 SciLexer: Change project configuration to enable Google Test [#35]
- 35 SciLexer: Change project configuration to enable Google Test [#35]