diff options
author | Dmitriy Kargapolov <[email protected]> | 2015-02-03 16:39:39 -0500 |
---|---|---|
committer | Dmitriy Kargapolov <[email protected]> | 2015-02-03 16:39:39 -0500 |
commit | 2fdc3d313485a76b6acf12154b8f3bd3e1ceb2ca (patch) | |
tree | 39e42440dcaebb29368fd0290391d328f216524b /lib/jinterface/test/jinterface_SUITE.erl | |
parent | ab1cfe19a0af082a2c207fb5c07c7a6ad5782c14 (diff) | |
download | otp-2fdc3d313485a76b6acf12154b8f3bd3e1ceb2ca.tar.gz otp-2fdc3d313485a76b6acf12154b8f3bd3e1ceb2ca.tar.bz2 otp-2fdc3d313485a76b6acf12154b8f3bd3e1ceb2ca.zip |
jinterface: match/bind added to OtpErlangObject
Adding these two methods to the OtpErlangObject abstract class makes possible
implementing of pattern matching and variable binding for all types of Erlang
terms. Particular implementations may vary and include additional classes to
define Variable placeholder objects and Bindings objects. Also Parser class
may be added to facilitate creating complex patterns and terms.
The purpose of this commit is to provide low level interface base methods
sufficient for variety of higher level pattern matching/variable binding
implementations.
OtpErlangMap class is re-designed for efficiency (it is based on HashMap now).
All changes are backward-compatible. Detailed test cases implemented.
Diffstat (limited to 'lib/jinterface/test/jinterface_SUITE.erl')
-rw-r--r-- | lib/jinterface/test/jinterface_SUITE.erl | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/jinterface/test/jinterface_SUITE.erl b/lib/jinterface/test/jinterface_SUITE.erl index 00abc97ff5..d0aca60438 100644 --- a/lib/jinterface/test/jinterface_SUITE.erl +++ b/lib/jinterface/test/jinterface_SUITE.erl @@ -39,7 +39,8 @@ status_handler_localStatus/1, status_handler_remoteStatus/1, status_handler_connAttempt/1, maps/1, - fun_equals/1 + fun_equals/1, + core_match_bind/1 ]). -include_lib("common_test/include/ct.hrl"). @@ -108,7 +109,8 @@ fundamental() -> get_names, % GetNames.java boolean_atom, % BooleanAtom.java maps, % Maps.java - fun_equals % FunEquals.java + fun_equals, % FunEquals.java + core_match_bind % CoreMatchBind.java ]. ping() -> @@ -705,6 +707,18 @@ fun_equals(Config) when is_list(Config) -> []). %%%----------------------------------------------------------------- +core_match_bind(doc) -> + ["CoreMatchBind.java: " + "Test OtpErlangObject.match() and bind()"]; +core_match_bind(suite) -> + []; +core_match_bind(Config) when is_list(Config) -> + ok = jitu:java(?config(java, Config), + ?config(data_dir, Config), + "CoreMatchBind", + []). + +%%%----------------------------------------------------------------- %%% INTERNAL FUNCTIONS %%%----------------------------------------------------------------- send_receive(TestCaseTag,Fun,Config) -> |