summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/cs/simple.cs
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-12-01 12:38:43 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-12-01 12:38:43 +0900
commitb67b7f2b784c7105e88a5e639d9d84736ae2cbc1 (patch)
tree0fd16d439c681c07d57d7f0d544c7582e04c3a31 /debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/cs/simple.cs
parentc0a6f1b84c84749908961579b84513fd9f9d9eac (diff)
downloadextra-dependencies-b67b7f2b784c7105e88a5e639d9d84736ae2cbc1.tar.gz
extra-dependencies-b67b7f2b784c7105e88a5e639d9d84736ae2cbc1.zip
uncrustify-trinity: updated based on upstream version 0.78.1
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/cs/simple.cs')
-rw-r--r--debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/cs/simple.cs114
1 files changed, 114 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/cs/simple.cs b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/cs/simple.cs
new file mode 100644
index 00000000..30acd134
--- /dev/null
+++ b/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/cs/simple.cs
@@ -0,0 +1,114 @@
+class X : Y {
+bool Method (int argument_1, int argument_2)
+{
+ #region something
+ int foo = 0;
+ #endregion
+
+if (argument_1 == argument_2)
+throw new Exception (Locale.GetText ("They are equal!"));
+
+if (argument_1 < argument_2) {
+if (argument_1 * 3 > 4)
+return true;
+else
+return false;
+}
+
+//
+// This sample helps keep your sanity while using 8-spaces for tabs
+//
+VeryLongIdentifierWhichTakesManyArguments (
+Argument1,
+Argument2, Argument3,
+NestedCallHere (
+MoreNested));
+}
+
+bool MyProperty {
+get { return x; }
+
+set { x = value; }
+}
+
+void AnotherMethod ()
+{
+ Logger log = new Logger();
+ log.foo.bar = 5;
+ log.narf.sweat = "cat";
+
+if ((a + 5) != 4) {
+}
+
+while (blah) {
+if (a)
+continue;
+b++;
+}
+}
+}
+
+object lockA;
+object lockB;
+
+void Foo () {
+ lock (lockA) {
+ lock (lockB) {
+ }
+ }
+}
+
+void Bar () {
+ lock (lockB) {
+ lock (lockA) {
+ }
+ }
+}
+
+
+// class library
+class Blah {
+ Hashtable ht;
+ void Foo (int zzz, Entry blah) {
+ lock (ht) {
+ ht.Add (zzz, blah);
+ }
+ }
+
+ void Bar ()
+ {
+ lock (ht) {
+ foreach (Entry e in ht)
+ EachBar (e);
+ }
+ }
+
+ virtual void EachBar (Entry e)
+ {
+ }
+}
+
+// User
+class MyBlah {
+ byte[] box = new byte[6];
+
+ box[2] = 56;
+
+ void DoStuff ()
+ {
+ lock (this) {
+ int i = GetNumber ();
+ Entry e = GetEntry ();
+
+ Foo (i, e);
+ }
+ }
+
+ override void EachBar (Entry e)
+ {
+ lock (this) {
+ DoSomething (e);
+ }
+ }
+}
+