-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #218 from ivsavchenko/bugfix/check-field-existence
"Sequence contains no matching element" while trying to load recursively assembly that has c++ dependencies
- Loading branch information
Showing
5 changed files
with
73 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// Copyright 2019 Florian Gather <[email protected]> | ||
// Copyright 2019 Fritz Brandhuber <[email protected]> | ||
// Copyright 2020 Pavel Fischer <[email protected]> | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
using ArchUnitNET.Domain; | ||
using ArchUnitNET.Domain.Extensions; | ||
using ArchUnitNET.Loader; | ||
using Xunit; | ||
|
||
namespace ArchUnitNETTests.Dependencies | ||
{ | ||
public class CppDependenciesTests | ||
{ | ||
private static readonly Architecture Architecture = new ArchLoader() | ||
.LoadAssembliesRecursively(new[] { typeof(CppExampleClassUser).Assembly }, | ||
filterFunc => FilterResult.LoadAndContinue) | ||
.Build(); | ||
|
||
[Fact] | ||
public void CppClassUserFound() | ||
{ | ||
var exampleCppUser = Architecture.GetClassOfType(typeof(CastClassA)); | ||
Assert.Contains(exampleCppUser, Architecture.Classes); | ||
} | ||
} | ||
|
||
internal class CppExampleClassUser | ||
{ | ||
CppExampleClass _cppExampleClass = new CppExampleClass(); | ||
} | ||
|
||
/* | ||
* C++/CLI code contains the next .h .cpp content | ||
CppExampleClass.h | ||
#pragma once | ||
public ref class CppExampleClass | ||
{ | ||
public: | ||
void DoCall(); | ||
}; | ||
CppExampleClass.cpp | ||
#include "pch.h" | ||
#include "CppExampleClass.h" | ||
void CppExampleClass::DoCall() | ||
{ | ||
} | ||
*/ | ||
} |
Binary file not shown.