Skip to content
This repository was archived by the owner on Nov 9, 2018. It is now read-only.

Commit 684fdf9

Browse files
committed
Adding support for discovering source information to tests
1 parent 7ae4f5f commit 684fdf9

31 files changed

+2715
-4
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
namespace Microsoft.Framework.TestAdapter
5+
{
6+
public interface ISourceInformationProvider
7+
{
8+
SourceInformation GetSourceInformation(string className, string methodName);
9+
}
10+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
namespace Microsoft.Framework.TestAdapter
5+
{
6+
public class SourceInformation
7+
{
8+
public SourceInformation(string filename, int lineNumber)
9+
{
10+
Filename = filename;
11+
LineNumber = lineNumber;
12+
}
13+
14+
public string Filename { get; }
15+
16+
public int LineNumber { get; }
17+
}
18+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
namespace dia2
5+
{
6+
public enum DataKind
7+
{
8+
DataIsUnknown,
9+
DataIsLocal,
10+
DataIsStaticLocal,
11+
DataIsParam,
12+
DataIsObjectPtr,
13+
DataIsFileStatic,
14+
DataIsGlobal,
15+
DataIsMember,
16+
DataIsStaticMember,
17+
DataIsConstant
18+
}
19+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
using System;
5+
using System.Runtime.InteropServices;
6+
7+
namespace dia2
8+
{
9+
[ComImport]
10+
[Guid("E6756135-1E65-4D17-8576-610761398C3C")]
11+
public class DiaDataSource
12+
{
13+
}
14+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
using System;
5+
using System.Runtime.InteropServices;
6+
7+
namespace dia2
8+
{
9+
[Guid("79F1BB5F-B66E-48E5-B6A9-1545C323CA3D"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
10+
[ComImport]
11+
public interface IDiaDataSource
12+
{
13+
[DispId(1)]
14+
string lastError
15+
{
16+
17+
[return: MarshalAs(UnmanagedType.BStr)]
18+
get;
19+
}
20+
21+
void loadDataFromPdb([MarshalAs(UnmanagedType.LPWStr)] [In] string pdbPath);
22+
23+
void loadAndValidateDataFromPdb([MarshalAs(UnmanagedType.LPWStr)] [In] string pdbPath, [In] ref Guid pcsig70, [In] uint sig, [In] uint age);
24+
25+
void loadDataForExe([MarshalAs(UnmanagedType.LPWStr)] [In] string executable, [MarshalAs(UnmanagedType.LPWStr)] [In] string searchPath, [MarshalAs(UnmanagedType.IUnknown)] [In] object pCallback);
26+
27+
void loadDataFromIStream([MarshalAs(UnmanagedType.Interface)] [In] IStream pIStream);
28+
29+
void openSession([MarshalAs(UnmanagedType.Interface)] out IDiaSession ppSession);
30+
31+
void loadDataFromCodeViewInfo([MarshalAs(UnmanagedType.LPWStr)] [In] string executable, [MarshalAs(UnmanagedType.LPWStr)] [In] string searchPath, [In] uint cbCvInfo, [In] ref byte pbCvInfo, [MarshalAs(UnmanagedType.IUnknown)] [In] object pCallback);
32+
33+
void loadDataFromMiscInfo([MarshalAs(UnmanagedType.LPWStr)] [In] string executable, [MarshalAs(UnmanagedType.LPWStr)] [In] string searchPath, [In] uint timeStampExe, [In] uint timeStampDbg, [In] uint sizeOfExe, [In] uint cbMiscInfo, [In] ref byte pbMiscInfo, [MarshalAs(UnmanagedType.IUnknown)] [In] object pCallback);
34+
}
35+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
using System;
5+
using System.Collections;
6+
using System.Reflection;
7+
using System.Runtime.InteropServices;
8+
9+
namespace dia2
10+
{
11+
[DefaultMember("Item"), Guid("486943E8-D187-4A6B-A3C4-291259FFF60D"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
12+
[ComImport]
13+
public interface IDiaEnumDebugStreamData
14+
{
15+
[DispId(1)]
16+
int count
17+
{
18+
19+
get;
20+
}
21+
[DispId(2)]
22+
string name
23+
{
24+
25+
[return: MarshalAs(UnmanagedType.BStr)]
26+
get;
27+
}
28+
29+
IEnumerator GetEnumerator();
30+
31+
void Item([In] uint index, [In] uint cbData, out uint pcbData, out byte pbData);
32+
33+
void Next([In] uint celt, [In] uint cbData, out uint pcbData, out byte pbData, out uint pceltFetched);
34+
35+
void Skip([In] uint celt);
36+
37+
void Reset();
38+
39+
void Clone([MarshalAs(UnmanagedType.Interface)] out IDiaEnumDebugStreamData ppenum);
40+
}
41+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
using System;
5+
using System.Collections;
6+
using System.Reflection;
7+
using System.Runtime.InteropServices;
8+
9+
namespace dia2
10+
{
11+
[DefaultMember("Item"), Guid("08CBB41E-47A6-4F87-92F1-1C9C87CED044"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
12+
[ComImport]
13+
public interface IDiaEnumDebugStreams
14+
{
15+
[DispId(1)]
16+
int count
17+
{
18+
19+
get;
20+
}
21+
22+
[return: MarshalAs(UnmanagedType.Interface)]
23+
IEnumerator GetEnumerator();
24+
25+
[return: MarshalAs(UnmanagedType.Interface)]
26+
IDiaEnumDebugStreamData Item([In] object index);
27+
28+
void Next([In] uint celt, [MarshalAs(UnmanagedType.Interface)] out IDiaEnumDebugStreamData rgelt, out uint pceltFetched);
29+
30+
void Skip([In] uint celt);
31+
32+
void Reset();
33+
34+
void Clone([MarshalAs(UnmanagedType.Interface)] out IDiaEnumDebugStreams ppenum);
35+
}
36+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
using System;
5+
using System.Collections;
6+
using System.Reflection;
7+
using System.Runtime.InteropServices;
8+
9+
namespace dia2
10+
{
11+
[DefaultMember("Item"), Guid("D5612573-6925-4468-8883-98CDEC8C384A"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
12+
[ComImport]
13+
public interface IDiaEnumInjectedSources
14+
{
15+
[DispId(1)]
16+
int count
17+
{
18+
19+
get;
20+
}
21+
22+
IEnumerator GetEnumerator();
23+
24+
[return: MarshalAs(UnmanagedType.Interface)]
25+
IDiaInjectedSource Item([In] uint index);
26+
27+
void Next([In] uint celt, [MarshalAs(UnmanagedType.Interface)] out IDiaInjectedSource rgelt, out uint pceltFetched);
28+
29+
void Skip([In] uint celt);
30+
31+
void Reset();
32+
33+
void Clone([MarshalAs(UnmanagedType.Interface)] out IDiaEnumInjectedSources ppenum);
34+
}
35+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
using System;
5+
using System.Collections;
6+
using System.Reflection;
7+
using System.Runtime.InteropServices;
8+
9+
namespace dia2
10+
{
11+
[DefaultMember("Item"), Guid("1C7FF653-51F7-457E-8419-B20F57EF7E4D"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
12+
[ComImport]
13+
public interface IDiaEnumInputAssemblyFiles
14+
{
15+
[DispId(1)]
16+
int count
17+
{
18+
19+
get;
20+
}
21+
22+
IEnumerator GetEnumerator();
23+
24+
[return: MarshalAs(UnmanagedType.Interface)]
25+
IDiaInputAssemblyFile Item([In] uint index);
26+
27+
void Next([In] uint celt, [MarshalAs(UnmanagedType.Interface)] out IDiaInputAssemblyFile rgelt, out uint pceltFetched);
28+
29+
void Skip([In] uint celt);
30+
31+
void Reset();
32+
33+
void Clone([MarshalAs(UnmanagedType.Interface)] out IDiaEnumInputAssemblyFiles ppenum);
34+
}
35+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
using System;
5+
using System.Collections;
6+
using System.Reflection;
7+
using System.Runtime.InteropServices;
8+
9+
namespace dia2
10+
{
11+
[DefaultMember("Item"), Guid("FE30E878-54AC-44F1-81BA-39DE940F6052"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
12+
[ComImport]
13+
public interface IDiaEnumLineNumbers
14+
{
15+
[DispId(1)]
16+
int count
17+
{
18+
19+
get;
20+
}
21+
22+
IEnumerator GetEnumerator();
23+
24+
[return: MarshalAs(UnmanagedType.Interface)]
25+
IDiaLineNumber Item([In] uint index);
26+
27+
void Next([In] uint celt, [MarshalAs(UnmanagedType.Interface)] out IDiaLineNumber rgelt, out uint pceltFetched);
28+
29+
void Skip([In] uint celt);
30+
31+
void Reset();
32+
33+
void Clone([MarshalAs(UnmanagedType.Interface)] out IDiaEnumLineNumbers ppenum);
34+
}
35+
}

0 commit comments

Comments
 (0)