Skip to content

Commit 8ba6c50

Browse files
committed
treewide: Reformat with ipt
1 parent 6c2ed70 commit 8ba6c50

File tree

111 files changed

+1685
-1697
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+1685
-1697
lines changed

docu/examples/CoverageDemoCode.ipf

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,44 @@
1-
#pragma TextEncoding = "UTF-8"
1+
#pragma TextEncoding="UTF-8"
22
#pragma version=1.10
33
#pragma rtGlobals=3 // Use modern global access method and strict wave access.
44
#pragma rtFunctionErrors=1
55

66
// IUTF_Coverage_example1_begin
77
Function Run1()
88
string traceOptions = ""
9-
string testsuite = "myTests.ipf"
9+
string testsuite = "myTests.ipf"
1010

1111
// Use traceWinList as regular expression
1212
traceOptions = ReplaceNumberByKey(UTF_KEY_REGEXP, traceOptions, 1)
1313

14-
RunTest(testsuite, traceWinList="CODE_.*\.ipf", traceOptions=traceOptions)
14+
RunTest(testsuite, traceWinList = "CODE_.*\.ipf", traceOptions = traceOptions)
1515
End
1616
// IUTF_Coverage_example1_end
1717

18-
1918
// IUTF_Coverage_example2_begin
2019
Function Run2()
2120
string traceOptions = ""
22-
string testsuite = "myTests.ipf"
21+
string testsuite = "myTests.ipf"
2322

2423
// Use traceWinList as regular expression
2524
traceOptions = ReplaceNumberByKey(UTF_KEY_REGEXP, traceOptions, 1)
2625
// Execute only instrumentation
2726
traceOptions = ReplaceNumberByKey(UTF_KEY_INSTRUMENTATIONONLY, traceOptions, 1)
2827

29-
RunTest(testsuite, traceWinList="CODE_.*\.ipf", traceOptions=traceOptions)
28+
RunTest(testsuite, traceWinList = "CODE_.*\.ipf", traceOptions = traceOptions)
3029
End
3130
// IUTF_Coverage_example2_end
3231

33-
3432
// IUTF_Coverage_example3_begin
3533
Function Run3()
3634
string traceOptions = ""
37-
string testsuite = "myTests.ipf"
35+
string testsuite = "myTests.ipf"
3836

3937
// Enables the output of Cobertura files
4038
traceOptions = ReplaceNumberByKey(UTF_KEY_COBERTURA, traceOptions, 1)
4139
// Disables the output of HTML files
4240
traceOptions = ReplaceNumberByKey(UTF_KEY_HTMLCREATION, traceOptions, 0)
4341

44-
RunTest(testsuite, traceWinList=testsuite, traceOptions=traceOptions)
42+
RunTest(testsuite, traceWinList = testsuite, traceOptions = traceOptions)
4543
End
4644
// IUTF_Coverage_example3_end

docu/examples/Example6/example6-runner.ipf

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66

77
Function run()
88

9-
RunTest("example6-automatic-invocation.ipf", enableJU=1)
9+
RunTest("example6-automatic-invocation.ipf", enableJU = 1)
1010
End

docu/examples/TAP_Examples/tap_example1b-warn_and_error.ipf

+11-11
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,30 @@
99
// TAPDescription: 123_Description_starts_with_digit_and_ends_with_double_cross_###
1010
Function TAPTestModulo()
1111

12-
CHECK_EQUAL_VAR(abs(1.5),1.5)
13-
CHECK_EQUAL_VAR(abs(-1.5),1.5)
14-
CHECK_EQUAL_VAR(abs(NaN),NaN)
12+
CHECK_EQUAL_VAR(abs(1.5), 1.5)
13+
CHECK_EQUAL_VAR(abs(-1.5), 1.5)
14+
CHECK_EQUAL_VAR(abs(NaN), NaN)
1515
// remember that NaN is not equal to NaN
1616
// this check will generate a warning message but due
1717
// to the usage of WARN instead of CHECK not increment the error count
1818
WARN(abs(NaN) == NaN)
19-
CHECK_EQUAL_VAR(abs(INF),INF)
20-
CHECK_EQUAL_VAR(abs(-INF),INF)
19+
CHECK_EQUAL_VAR(abs(Inf), Inf)
20+
CHECK_EQUAL_VAR(abs(-Inf), Inf)
2121
End
2222

2323
// TAPDirective: Look Left
2424
Function TAPTestModulo1()
2525

26-
CHECK_EQUAL_VAR(abs(1.5),1.5)
27-
CHECK_EQUAL_VAR(abs(-1.5),1.5)
28-
CHECK_EQUAL_VAR(abs(NaN),NaN)
26+
CHECK_EQUAL_VAR(abs(1.5), 1.5)
27+
CHECK_EQUAL_VAR(abs(-1.5), 1.5)
28+
CHECK_EQUAL_VAR(abs(NaN), NaN)
2929
// The following line fails
3030
CHECK_EQUAL_VAR(1, 2)
31-
CHECK_EQUAL_VAR(abs(INF),INF)
32-
CHECK_EQUAL_VAR(abs(-INF),INF)
31+
CHECK_EQUAL_VAR(abs(Inf), Inf)
32+
CHECK_EQUAL_VAR(abs(-Inf), Inf)
3333
End
3434

3535
// TAPDirective: SKIP with TAP enabled this Test Case is not executed (skipped) and reported 'ok', when executed it fails
3636
Function TAPTestSkip()
37-
CHECK_EQUAL_VAR(1,2)
37+
CHECK_EQUAL_VAR(1, 2)
3838
End

docu/examples/example1-plain.ipf

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ Function TestAbs()
1010
CHECK_EQUAL_VAR(abs(-1.5), 1.5)
1111
CHECK_EQUAL_VAR(abs(NaN), NaN)
1212
WARN(abs(NaN) == NaN)
13-
CHECK_EQUAL_VAR(abs(INF), INF)
14-
CHECK_EQUAL_VAR(abs(-INF), INF)
13+
CHECK_EQUAL_VAR(abs(Inf), Inf)
14+
CHECK_EQUAL_VAR(abs(-Inf), Inf)
1515
End

docu/examples/example10-peakfind.ipf

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#pragma TextEncoding = "UTF-8"
1+
#pragma TextEncoding="UTF-8"
22
#pragma version=1.10
3-
#pragma rtGlobals=3 // Use modern global access method and strict wave access.
3+
#pragma rtGlobals=3 // Use modern global access method and strict wave access.
44

55
#include "igortest"
66

@@ -11,15 +11,15 @@ Function testSinglePeakFit()
1111

1212
// define a peak
1313
variable peak_position = 570
14-
variable peak_fwhm = 50
14+
variable peak_fwhm = 50
1515

1616
// create the peak
1717
Make/O root:spectrum/WAVE=peak
1818
SetScale x, 0, 1000, "nm", peak
1919
peak = Gauss(x, peak_position, peak_fwhm) + gnoise(1e-3)
2020

2121
// do the fit
22-
wave/Z/WAVE peakParam = Utilities#FitGauss(peak)
22+
WAVE/Z/WAVE peakParam = Utilities#FitGauss(peak)
2323

2424
// check that our input wave was good
2525
REQUIRE_WAVE(peak, NUMERIC_WAVE, minorType = FLOAT_WAVE)
@@ -31,11 +31,11 @@ Function testSinglePeakFit()
3131
WARN_EQUAL_VAR(1.0, DimSize(peakParam, 0))
3232

3333
// convert to human readable result
34-
wave/Z peakInfo = Utilities#peakParamToResult(peakParam)
34+
WAVE/Z peakInfo = Utilities#peakParamToResult(peakParam)
3535

3636
// again, check that the function returned a valid wave
3737
CHECK_WAVE(peakInfo, FREE_WAVE | NUMERIC_WAVE)
3838
// check the found peak against the peak definition
39-
REQUIRE_CLOSE_VAR(peakInfo[0][%position], peak_position, tol=peakInfo[0][%position_err])
40-
REQUIRE_CLOSE_VAR(peakInfo[0][%fwhm], peak_fwhm, tol=peakInfo[0][%fwhm_err])
39+
REQUIRE_CLOSE_VAR(peakInfo[0][%position], peak_position, tol = peakInfo[0][%position_err])
40+
REQUIRE_CLOSE_VAR(peakInfo[0][%fwhm], peak_fwhm, tol = peakInfo[0][%fwhm_err])
4141
End

docu/examples/example11-background.ipf

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ End
2727
Function BackgroundTest2()
2828

2929
CtrlNamedBackGround testtask, proc=Example11#ReEntryTask, period=1, start
30-
RegisterIUTFMonitor("testtask", 1, "SecondReentry_REENTRY", timeout=2)
30+
RegisterIUTFMonitor("testtask", 1, "SecondReentry_REENTRY", timeout = 2)
3131
End
3232

3333
// The registered reentry function from BackgroundTest()

docu/examples/example12-background-using-hooks.ipf

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ End
2929
// of this test case later.
3030
Function MonitorInHookTest()
3131

32-
string infoText = "Entering example test case"
32+
string infoText = "Entering example test case"
3333
string badComparison = "in MonitorInHookTest()"
3434
// the warning will generate output to history
3535
WARN_EQUAL_STR(infoText, badComparison)
@@ -40,7 +40,7 @@ End
4040
// We generate some history output with a warning.
4141
Function TestCase_reentry()
4242

43-
string infoText = "Continuing example test case in reentry function..."
43+
string infoText = "Continuing example test case in reentry function..."
4444
string badComparison = "in TestCase_reentry()"
4545
// the warning will generate output to history
4646
WARN_EQUAL_STR(infoText, badComparison)

docu/examples/example13-multi-test-data.ipf

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static Function MDTestCaseWv([wv])
5858
End
5959

6060
static Function/WAVE tcDataGenDFR()
61-
DFREF dfr = NewFreeDataFolder()
61+
DFREF dfr = NewFreeDataFolder()
6262
string/G dfr:data = "Damn it, Steve!"
6363
Make/FREE/DF w = {dfr}
6464
return w

docu/examples/example14-info.ipf

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#pragma TextEncoding = "UTF-8"
1+
#pragma TextEncoding="UTF-8"
22
#pragma version=1.10
3-
#pragma rtGlobals=3 // Use modern global access method and strict wave access
4-
#pragma DefaultTab={3,20,4} // Set default tab width in Igor Pro 9 and later
3+
#pragma rtGlobals=3 // Use modern global access method and strict wave access
4+
#pragma DefaultTab={3, 20, 4} // Set default tab width in Igor Pro 9 and later
55
#pragma ModuleName=InfoTest
66

77
#include "igortest"
@@ -28,9 +28,9 @@ static Function Test1()
2828
WARN(0)
2929

3030
// Information with string parameter wave
31-
INFO("Param: %s", s = { "a" })
32-
INFO("Param: %s %s %s %s %s %s %s", s = { "1", "2", "3", "4", "5", "6", "7" })
33-
INFO("Param: @%s", s = { "a", "b", "c" }) // print wave at once
31+
INFO("Param: %s", s = {"a"})
32+
INFO("Param: %s %s %s %s %s %s %s", s = {"1", "2", "3", "4", "5", "6", "7"})
33+
INFO("Param: @%s", s = {"a", "b", "c"}) // print wave at once
3434
WARN(0)
3535

3636
// Information with numeric parameter
@@ -41,9 +41,9 @@ static Function Test1()
4141
WARN(0)
4242

4343
// Information with numeric parameter wave
44-
INFO("Param: %d", n = { 1 })
45-
INFO("Param: %d %d %d %d %d %d %d", n = { 1, 2, 3, 4, 5, 6, 7 })
46-
INFO("Param: @%d", n = { 1, 2, 3 })
44+
INFO("Param: %d", n = {1})
45+
INFO("Param: %d %d %d %d %d %d %d", n = {1, 2, 3, 4, 5, 6, 7})
46+
INFO("Param: @%d", n = {1, 2, 3})
4747
WARN(0)
4848

4949
// Mixing numeric and string parameter
@@ -52,7 +52,7 @@ static Function Test1()
5252
WARN(0)
5353

5454
// use special formating for numeric parameter
55-
INFO("Param: %.3f %g %.1W0P", n = { 3.1415, 5.01, 1e6 })
55+
INFO("Param: %.3f %g %.1W0P", n = {3.1415, 5.01, 1e6})
5656
WARN(0)
5757

5858
// no info is carried over to the next test case

docu/examples/example2-plain.ipf

+7-7
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ Function run_IGNORE()
1010
// executes all test cases of this file
1111
RunTest("example2-plain.ipf")
1212
// execute only one test case at a time
13-
RunTest("example2-plain.ipf", testCase="VerifyStringComparison")
13+
RunTest("example2-plain.ipf", testCase = "VerifyStringComparison")
1414
// explicitly specify both tests
15-
RunTest("example2-plain.ipf", testCase="VerifyStringComparison;VerfifyEmptyString")
15+
RunTest("example2-plain.ipf", testCase = "VerifyStringComparison;VerfifyEmptyString")
1616
// specify with regular expression
17-
RunTest("example2-plain.ipf", testCase="Verify.*", enableRegExp = 1)
17+
RunTest("example2-plain.ipf", testCase = "Verify.*", enableRegExp = 1)
1818
// Give the test a descriptive name
19-
RunTest("example2-plain.ipf", name="My first test")
19+
RunTest("example2-plain.ipf", name = "My first test")
2020
End
2121

2222
static Function VerifyStringComparison()
2323

24-
string strLow = "123abc"
25-
string strUP = "123ABC"
24+
string strLow = "123abc"
25+
string strUP = "123ABC"
2626

2727
// by default string comparison is done case sensitive
2828
// so the following would fail with CHECK/REQUIRE
@@ -38,7 +38,7 @@ End
3838
static Function VerfifyEmptyString()
3939

4040
string nullString
41-
string emptyString = ""
41+
string emptyString = ""
4242
string filledString = "filled"
4343

4444
// an uninitialized string is not equal to an empty string.

docu/examples/example3-plain.ipf

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@
88
// WARN_* does not increment the error count
99
Function WarnTest()
1010

11-
WARN_EQUAL_VAR(1.0,0.0)
11+
WARN_EQUAL_VAR(1.0, 0.0)
1212
End
1313

1414
// CHECK_* increments the error count
1515
Function CheckTest()
1616

17-
CHECK_EQUAL_VAR(1.0,0.0)
17+
CHECK_EQUAL_VAR(1.0, 0.0)
1818
End
1919

2020
// REQUIRE_* will stop execution of the test run immediately
2121
Function RequireTest()
2222

23-
REQUIRE_EQUAL_VAR(1.0,0.0)
23+
REQUIRE_EQUAL_VAR(1.0, 0.0)
2424
print "If I'm reached math is wrong !"
2525
End
2626

docu/examples/example4-wavechecking.ipf

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
#include "igortest"
77

8-
98
static Function CheckMakeDouble()
109

1110
CHECK_EMPTY_FOLDER()

docu/examples/example5-extensionhooks-otherSuite.ipf

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ End
3636

3737
Function CheckBasicMath()
3838

39-
CHECK_EQUAL_VAR(1+2,3)
39+
CHECK_EQUAL_VAR(1 + 2, 3)
4040
End

docu/examples/example8-uncaught-runtime-errors.ipf

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
Function TestWaveOp()
99

10-
Wave wv = $""
10+
WAVE wv = $""
1111
print wv[0]
1212
print "This will be printed, even if a RTE occurs."
1313

@@ -17,7 +17,7 @@ End
1717

1818
Function CheckForRTEs()
1919

20-
Wave wv = $""
20+
WAVE wv = $""
2121
print wv[0]
2222
// Check if any RTE occurs. If no RTE exists at this point it will create an assertion error.
2323
CHECK_ANY_RTE()

docu/examples/example9-IM.ipf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#pragma TextEncoding = "UTF-8"
1+
#pragma TextEncoding="UTF-8"
22
#pragma version=1.10
33
#pragma rtGlobals=3
44
#pragma IndependentModule=Example9

internal_dev/DataGenSpecificWaveTypes.ipf

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Function/WAVE myMDGeneratorMulti()
1212
Make/FREE/T wt = {"1"}
1313
Make/FREE/D wNum
1414

15-
// Including the following line in favor to the next has to result in a type error report
16-
// Make/FREE/WAVE wref = {wt, wt, wNum}
15+
// Including the following line in favor to the next has to result in a type error report
16+
// Make/FREE/WAVE wref = {wt, wt, wNum}
1717
Make/FREE/WAVE wref = {wt, wt}
1818

1919
return wref
@@ -50,7 +50,7 @@ Function myMDTestText([textWave])
5050

5151
Make/FREE/T w1 = {"1"}
5252

53-
CHECK_EQUAL_WAVES(w1, textWave, mode=WAVE_DATA)
53+
CHECK_EQUAL_WAVES(w1, textWave, mode = WAVE_DATA)
5454
End
5555

5656
// IUTF_TD_GENERATOR myMDGeneratorText
@@ -60,7 +60,7 @@ Function myMDTestGeneric([wv])
6060
WAVE/T textWave = wv
6161
Make/FREE/T w1 = {"1"}
6262

63-
CHECK_EQUAL_WAVES(w1, textWave, mode=WAVE_DATA)
63+
CHECK_EQUAL_WAVES(w1, textWave, mode = WAVE_DATA)
6464
End
6565

6666
// IUTF_TD_GENERATOR myMDGeneratorDFR
@@ -76,7 +76,7 @@ Function myMDTestMulti([textWave])
7676

7777
Make/FREE/T w1 = {"1"}
7878

79-
CHECK_EQUAL_WAVES(w1, textWave, mode=WAVE_DATA)
79+
CHECK_EQUAL_WAVES(w1, textWave, mode = WAVE_DATA)
8080
End
8181

8282
// IUTF_TD_GENERATOR myMDGeneratorWAVE

0 commit comments

Comments
 (0)