Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gtest-076.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 699cf327c56f5fe0f2b8927300b7f620d14b4e35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;

struct Foo<T>
{
	public T Data;

	public Foo (T data)
	{
		this.Data = data;
	}
}

class Test<T>
{
	public Foo<T> GetFoo (T data)
	{
		return new Foo<T> (data);
	}
}

class X
{
	public static int Main ()
	{
		Test<long> test = new Test<long> ();
		Foo<long> foo = test.GetFoo (0x800);
		//
		// This is a very simple test, just make sure the struct
		// is returned correctly.  This was broken until recently
		// and I just fixed it on amd64.
		if (foo.Data != 0x800)
			return 1;
		return 0;
	}
}