<commit_before>package test

import fr.inria.diverse.k3.al.annotationprocessor.Opposite
import org.junit.Before
import org.junit.Test

import static org.junit.Assert.*

/*
 * +-----------+
 * |     C     |
 * |-----------|
 * |           |
 * |           |
 * +-----------+
 *     c | 1
 *       |
 *       |
 *     a | 1
 * +-----------+ a       b +-------+
 * |     A     |-----------|   B   |
 * |-----------| 1       1 |-------|
 * |           |           |       |
 * |           | aa     bb |       |
 * |           |-----------|       |
 * +-----------+ 1       1 +-------+
 *      /\                     /\
 *      ||                     ||
 * +-----------+ d1        +-------+
 * |     D     |------     |   E   |
 * |-----------| 1   |     |-------|
 * |           |     |     |       |
 * |           |     |     +-------+
 * |           | d2  |
 * |           |------
 * |           | 1
 * +-----------+
 * 
 */
 
class A
{
	@Opposite("a")
	B b
	
	@Opposite("aa")
	B bb
	
	@Opposite("a")
	C c
}

class B
{
	@Opposite("b")
	A a
	
	@Opposite("bb")
	A aa
}

class C
{
	@Opposite("c")
	A a
}

class D extends A
{
	@Opposite("d2")
	D d1
	
	@Opposite("d1")
	D d2
}

class E extends B
{}

class TestOpposite {
	A a1
	A a2
	B b1
	B b2
	C c1
	D d1
	D d2
	E e1
	
	@Before
	def void setUp()
	{
		a1 = new A
		a2 = new A
		b1 = new B
		b2 = new B
		c1 = new C
		d1 = new D
		d2 = new D
		e1 = new E
	}
	
	@Test
	def void testOneToOneInitialization()
	{
		assertNull(a1.b)
		assertNull(a1.bb)
		assertNull(a1.c)
		assertNull(b1.a)
		assertNull(b1.aa)
		assertNull(c1.a)
	}
	
	@Test
	def void testOneToOneSimple()
	{<commit_msg>k3-al: Avoid conflicts in tests data naming<commit_after>package test

import fr.inria.diverse.k3.al.annotationprocessor.Opposite
import org.junit.Before
import org.junit.Test

import static org.junit.Assert.*

/*
 * +-----------+
 * |     C     |
 * |-----------|
 * |           |
 * |           |
 * +-----------+
 *     c | 1
 *       |
 *       |
 *     a | 1
 * +-----------+ a       b +-------+
 * |     A     |-----------|   B   |
 * |-----------| 1       1 |-------|
 * |           |           |       |
 * |           | aa     bb |       |
 * |           |-----------|       |
 * +-----------+ 1       1 +-------+
 *      /\                     /\
 *      ||                     ||
 * +-----------+ d1        +-------+
 * |     D     |------     |   E   |
 * |-----------| 1   |     |-------|
 * |           |     |     |       |
 * |           |     |     +-------+
 * |           | d2  |
 * |           |------
 * |           | 1
 * +-----------+
 * 
 */
 
class OpA
{
	@Opposite("a")
	OpB b
	
	@Opposite("aa")
	OpB bb
	
	@Opposite("a")
	OpC c
}

class OpB
{
	@Opposite("b")
	OpA a
	
	@Opposite("bb")
	OpA aa
}

class OpC
{
	@Opposite("c")
	OpA a
}

class OpD extends OpA
{
	@Opposite("d2")
	OpD d1
	
	@Opposite("d1")
	OpD d2
}

class OpE extends OpB
{}

class TestOpposite {
	OpA a1
	OpA a2
	OpB b1
	OpB b2
	OpC c1
	OpD d1
	OpD d2
	OpE e1
	
	@Before
	def void setUp()
	{
		a1 = new OpA
		a2 = new OpA
		b1 = new OpB
		b2 = new OpB
		c1 = new OpC
		d1 = new OpD
		d2 = new OpD
		e1 = new OpE
	}
	
	@Test
	def void testOneToOneInitialization()
	{
		assertNull(a1.b)
		assertNull(a1.bb)
		assertNull(a1.c)
		assertNull(b1.a)
		assertNull(b1.aa)
		assertNull(c1.a)
	}
	
	@Test
	def void testOneToOneSimple()
	{
{'fraction_non_alphanumeric': 0.23983253588516745, 'fraction_numerical': 0.02242822966507177, 'mean_word_length': 0.9447674418604651, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5045667', 'n_tokens_mistral': 1463, 'n_tokens_neox': 1329, 'n_words': 266}