note
	description: "[
		{SETS_TESTS_RESOURCES_UNARY_AB}, derived for {detachable INTEGER_REF} and {detachable separate CHARACTER_REF} generic parameters, compared, respectively, by object value
		and object reference.
		]"
	author: "Rosivaldo Fernandes Alves"
	date: "$Date: Sat 2018-11-10 18:52:01 -0300 $"
	revision: "$Revision$"
	testing: "type/manual"

class
	SETS_TESTS_RESOURCES_UNARY_IC

inherit
	SETS_TESTS_RESOURCES_UNARY_AB [
		detachable INTEGER_REF, detachable separate CHARACTER_REF,
		STS_OBJECT_EQUALITY [detachable INTEGER_REF],
		STS_REFERENCE_EQUALITY [detachable separate CHARACTER_REF]
		]
		redefine
			on_prepare
		end

feature -- Access

	resources_ab: SETS_TESTS_RESOURCES_TERNARY_NIC
			-- Pool of features for ordered pairs of integer and separate character references

feature {NONE} -- Events

	on_prepare
			-- <Precursor>
		do
			create resources_ab
			create eq_a
			create eq_b
			create eq_ab
		end

feature -- Predicate

	p_x (
		x: STS_ORDERED_PAIR [
			detachable INTEGER_REF, detachable separate CHARACTER_REF,
			STS_OBJECT_EQUALITY [detachable INTEGER_REF],
			STS_REFERENCE_EQUALITY [detachable separate CHARACTER_REF]
			]
		): BOOLEAN
			-- <Precursor>
		do
			if attached x.a as x_a and attached x.b as x_b then
				separate x_b as sep_x_b do
					Result := (sep_x_b.item.code + x_a.item) \\ 2 = 0
				end
			end
		end

	p_x1_x2 (
		x1, x2: STS_ORDERED_PAIR [
			detachable INTEGER_REF, detachable separate CHARACTER_REF,
			STS_OBJECT_EQUALITY [detachable INTEGER_REF],
			STS_REFERENCE_EQUALITY [detachable separate CHARACTER_REF]
			]
		): BOOLEAN
			-- <Precursor>
		do
			if attached x1.b as x1_b and attached x2.b as x2_b then
				separate x1_b as sep_x1_b, x2_b as sep_x2_b do
					Result := sep_x1_b.item.code \\ 2 /= (sep_x1_b.item.code + sep_x2_b.item.code) \\ 2
				end
			end
		end

feature {SET_PROPERTIES} -- Implementation

	max_asserted_elements: NATURAL = 524_288 -- 2 ^ 19
			-- <Precursor>

note
	copyright: "Copyright (c) 2012-2021, Rosivaldo Fernandes Alves"
	license: "[
		Eiffel Forum License v2
		(see http://www.eiffel.com/licensing/forum.txt)
		]"
	source: "https://launchpad.net/set-theory"

end
