MCPcopy Create free account
hub / github.com/SimpleITK/SimpleITK / CheckHash

Method CheckHash

Testing/Unit/CSharp/CSharpImageTest.cs:12–22  ·  view source on GitHub ↗
(Image img, string expectedHash, ref int success)

Source from the content-addressed store, hash-verified

10 public const int ExitFailure = 1;
11
12 public static int CheckHash(Image img, string expectedHash, ref int success)
13 {
14 HashImageFilter hasher = new HashImageFilter();
15 string actualHash = hasher.Execute(img);
16 if (actualHash != expectedHash)
17 {
18 success = ExitFailure;
19 Console.WriteLine("Expected hash: \"{0}\" actual hash: \"{1}\".", expectedHash, actualHash );
20 }
21 return 0;
22 }
23
24 /// <summary>Main entry point.</summary>
25 public static int Main (string[] args) {

Callers

nothing calls this directly

Calls 1

ExecuteMethod · 0.45

Tested by

no test coverage detected