File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Collections . Generic ;
3+ using System . Text ;
4+
5+ namespace Clojure . Tests . Support
6+ {
7+ public class GenericsTest
8+ {
9+ // Zero-arg generic instance method
10+ public T InstMethod0 < T > ( ) { return default ; }
11+
12+ // Zero-arg static method
13+ public static T StaticMethod0 < T > ( ) { return default ; }
14+
15+ }
16+ }
Original file line number Diff line number Diff line change 1212 <PackageReference Include =" clojure.tools.namespace" Version =" 1.4.4" />
1313 </ItemGroup >
1414
15+ <ItemGroup >
16+ <ProjectReference Include =" ..\Clojure.Tests.Support\Clojure.Tests.Support.csproj" />
17+ </ItemGroup >
18+
1519 <ItemGroup >
1620 <None Update =" clojure\run_test.clj" >
1721 <CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
5559 <None Update =" clojure\test_clojure\clr\added.clj" >
5660 <CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
5761 </None >
62+ <None Update =" clojure\test_clojure\clr\generic_interop.cljr" >
63+ <CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
64+ </None >
5865 <None Update =" clojure\test_clojure\clr\io.clj" >
5966 <CopyToOutputDirectory >PreserveNewest</CopyToOutputDirectory >
6067 </None >
Original file line number Diff line number Diff line change 1+ ; Copyright (c) Rich Hickey. All rights reserved.
2+ ; The use and distribution terms for this software are covered by the
3+ ; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
4+ ; which can be found in the file epl-v10.html at the root of this distribution.
5+ ; By using this software in any fashion, you are agreeing to be bound by
6+ ; the terms of this license.
7+ ; You must not remove this notice, or any other, from this software.
8+
9+ ;; Tests added for ClojureCLR -- miscellaneous
10+
11+ (ns clojure.test-clojure.clr.generic-interop
12+ (:use clojure.test
13+ [clojure.test.generative :exclude (is)]
14+ clojure.template)
15+ (:require [clojure.data.generators :as gen]
16+ [clojure.test-helper :as helper]))
17+
18+ (assembly-load-from "Clojure.Tests.Support.dll")
19+ (import '[Clojure.Tests.Support GenericsTest])
20+
21+ (set! *warn-on-reflection* true)
22+
23+ (deftest static-generic-method-no-reflection
24+ (should-not-reflect (GenericsTest/StaticMethod0)))
25+
26+ (deftest instance-generic-method-no-reflection
27+ (should-not-reflect (.InstanceMethod0 (GenericsTest.))))
28+
29+
30+
You can’t perform that action at this time.
0 commit comments