Commit Graph

66 Commits

Author SHA1 Message Date
svenbarth
9853ed53e8 * partial fix for Mantis #36358: apply partial, adjusted patch by Imants Gulbis to extend TRttiProperty.SetValue and TRttiProperty.GetValue
* extended test suite

git-svn-id: trunk@43780 -
2019-12-24 21:30:18 +00:00
svenbarth
be1439e93e * partial fix for Mantis #36356: apply partial, adjusted patch by Imants Gulbis to add methods for TValue to retrieve a AnsiChar or WideChar (this is not Delphi compatible, but convenient)
git-svn-id: trunk@43779 -
2019-12-24 21:30:13 +00:00
svenbarth
d98e551882 + add a generic variant of TValue.IsType
* extended test

git-svn-id: trunk@43591 -
2019-11-25 21:13:37 +00:00
svenbarth
63d83de063 * ccReg is the default calling convention on selected architectures (though I wonder why x86_64 returns ccReg as well when it does not support ccReg... :/ )
git-svn-id: trunk@42810 -
2019-08-24 23:08:42 +00:00
svenbarth
117fa8fa53 * Writeln is only needed for Debug
git-svn-id: trunk@42809 -
2019-08-24 23:08:39 +00:00
svenbarth
58ada1f547 + add a test for RawThunk; this does not require a function call manager thus it's better to place it in the general RTTI testcase so that it's always tested
git-svn-id: trunk@42733 -
2019-08-18 18:30:39 +00:00
svenbarth
62a61bdb41 * fix ifdefs for non-fpc (Lazarus likes to mess these up during auto completion...)
git-svn-id: trunk@42732 -
2019-08-18 18:30:37 +00:00
svenbarth
16f47fbee3 * explicitely ignore the TestIntfMethods test if TVirtualInterface is not supported
git-svn-id: trunk@42710 -
2019-08-16 15:43:09 +00:00
svenbarth
253f65c5b2 * fix for Mantis #35687: implement TValue.FromOrdinal()
+ added tests

git-svn-id: trunk@42221 -
2019-06-13 21:08:44 +00:00
svenbarth
34569080be * correctly handle both Ansi- and WideChar in TValue
+ added tests

git-svn-id: trunk@42220 -
2019-06-13 21:08:41 +00:00
svenbarth
a2a403e2e5 * fix for Mantis #35693: IsOrdinal also needs to return true for enums (with that AsOrdinal will work correctly as well)
* extended RTTI test by a test for enums

git-svn-id: trunk@42219 -
2019-06-13 21:08:38 +00:00
svenbarth
fb0f2fbd35 * enable method implementation tests for i386 (interface tests will be ignored however as stdcall/cdecl are not yet provided without an external manager)
git-svn-id: trunk@42185 -
2019-06-06 20:51:57 +00:00
svenbarth
601f0bd6b1 * if the creation of the method implementation raises ENotImplemented we ignore the test as not all calling conventions might be supported currently (e.g. on i386 only "register" is for now)
git-svn-id: trunk@42151 -
2019-05-31 15:41:06 +00:00
svenbarth
1d6b591872 * add tests for TVirtualInterface
git-svn-id: trunk@42089 -
2019-05-16 21:44:54 +00:00
svenbarth
5d6a837b63 * also test callbacks for libffi
git-svn-id: trunk@42072 -
2019-05-15 05:28:57 +00:00
svenbarth
c6d963ccd9 * also enable implementation tests on Win64
git-svn-id: trunk@41842 -
2019-04-05 15:24:34 +00:00
svenbarth
2eb4955613 * extend RTTI tests for untyped parameters
git-svn-id: trunk@41832 -
2019-04-04 19:32:06 +00:00
pierre
128982a5bc Explicitly set values inside TestDataSize procedure to avoid range check errors as values are copied when TValue.Make is called
git-svn-id: trunk@41768 -
2019-03-22 14:27:41 +00:00
svenbarth
42d126e713 * enable Invoke() tests for i386
git-svn-id: trunk@41537 -
2019-03-01 15:21:01 +00:00
svenbarth
c2da9abd17 * correctly compare floating point values in TValue
git-svn-id: trunk@41535 -
2019-03-01 15:20:56 +00:00
svenbarth
56eaa913b5 * correctly check for the Extended value of a Currency and Comp value
git-svn-id: trunk@40765 -
2019-01-04 15:03:27 +00:00
svenbarth
30b1a45704 + add tests for TMethodImplementation for method and procedure variables
git-svn-id: trunk@40700 -
2018-12-29 19:21:20 +00:00
svenbarth
bef1b84d63 * move utility code to a separate unit
git-svn-id: trunk@40692 -
2018-12-29 19:20:51 +00:00
svenbarth
cfd8df4894 + add tests for raw Invoke() which needs to determine the result location by itself
git-svn-id: trunk@40667 -
2018-12-26 22:59:39 +00:00
svenbarth
30f14cfcc0 + add some more tests for floating point values
git-svn-id: trunk@40665 -
2018-12-26 22:59:33 +00:00
svenbarth
551e36cd19 + add tests for floating point arguments and results
git-svn-id: trunk@40663 -
2018-12-26 22:59:27 +00:00
svenbarth
0d09c3c124 + add utility functions to get TValue values for Single, Double, Extended, Comp and Currency
git-svn-id: trunk@40662 -
2018-12-26 22:59:24 +00:00
svenbarth
bd328025fd * correctly compare tkFloat values
git-svn-id: trunk@40661 -
2018-12-26 22:59:21 +00:00
svenbarth
8d235b5f26 * more correct handling of floating point values (especially Comp and Currency) inside TValue
git-svn-id: trunk@40660 -
2018-12-26 22:59:18 +00:00
svenbarth
e644e6332b - remove forgotten debug code
git-svn-id: trunk@39897 -
2018-10-07 12:51:09 +00:00
svenbarth
c97b607e60 * also run invoke tests if internal function call manager is available (which we prefer to the ffi one)
git-svn-id: trunk@39896 -
2018-10-07 12:26:09 +00:00
svenbarth
509383aeb3 + add define to use ffi function call manager for tests
git-svn-id: trunk@39895 -
2018-10-07 12:26:06 +00:00
svenbarth
afc83b9f70 + implement the high level Invoke() for TRttiMethod (currently only for interface methods), TRttiMethodType and TRttiProcedureType
git-svn-id: trunk@39893 -
2018-10-07 12:25:59 +00:00
svenbarth
7bb147dce0 + add TRttiMethodType for method variables and TRttiProcedureType for procedure variables
git-svn-id: trunk@39888 -
2018-10-07 12:25:42 +00:00
svenbarth
0f7f9c2bb8 + add support for open arrays in TValue; this is *not* supported by Delphi
Note: open array TValue "instances" are only valid till the routine with the open array parameter has returned, but they can be converted to a dynamic array value with the help of the OpenArrayToDynArrayValue<> function

git-svn-id: trunk@39886 -
2018-10-07 12:25:36 +00:00
svenbarth
be698b970b * ensure the correct values for TValue.GetReferenceToRawData for TObject and dynamic array types
git-svn-id: trunk@39883 -
2018-10-07 12:25:27 +00:00
pierre
40f443a974 Add SKIPTARGET for OSes that do not compile fcl-fpcunit
git-svn-id: trunk@38643 -
2018-03-28 14:27:25 +00:00
svenbarth
88a9d07820 * extend test so that the methods and parameters of interfaces are checked as well
git-svn-id: trunk@37764 -
2017-12-18 21:37:50 +00:00
svenbarth
c15bcc693d * also check the base types of interfaces
git-svn-id: trunk@37706 -
2017-12-08 23:01:25 +00:00
svenbarth
1cb4514526 + add support for interface types (both reference counted and raw ones)
git-svn-id: trunk@37704 -
2017-12-08 22:52:26 +00:00
svenbarth
0954572af9 * only check result if the call itself succeeded (e.g. didn't fail due to the invoke manager not supporting the calling convention)
git-svn-id: trunk@37700 -
2017-12-08 14:56:48 +00:00
svenbarth
d9bc656852 * use new pool functionality for property instances
* extended test

git-svn-id: trunk@37418 -
2017-10-07 17:32:28 +00:00
svenbarth
0c8f670ee0 + add TRttiPointerType
* extend Rtti test

git-svn-id: trunk@37402 -
2017-10-05 21:10:30 +00:00
svenbarth
179b59753d + add optional, not by default enabled test for Invoke
git-svn-id: trunk@37095 -
2017-08-31 21:10:10 +00:00
svenbarth
0b1b82bb2d * test reference of empty values of different types
git-svn-id: trunk@37075 -
2017-08-27 14:02:14 +00:00
svenbarth
25d9c85a87 - remove debug output -.-
git-svn-id: trunk@37073 -
2017-08-27 13:30:06 +00:00
svenbarth
36451e271c * test for unassigned TypeInfo
git-svn-id: trunk@37072 -
2017-08-27 13:29:14 +00:00
svenbarth
4de7b43a5c * enable tests of TTestMethod, TTestEnum and TTestSet now that they're public and Delphi doesn't complain anymore about them not having any runtime information...
git-svn-id: trunk@37070 -
2017-08-27 12:42:45 +00:00
svenbarth
b1439c066a * share types to reduce unnecessary duplication
git-svn-id: trunk@37067 -
2017-08-27 11:59:34 +00:00
svenbarth
4dc6d1f8f6 * test for correct DataSize if value is empty
git-svn-id: trunk@37066 -
2017-08-27 11:47:39 +00:00