Re: [PATCH xorg-gtest] Rename headers to use dashes only

2012-07-03 Thread Chase Douglas

On 07/02/2012 08:17 PM, Peter Hutterer wrote:

Mixing dashes and spaces in xorg-gtest_foobar.h is a painful naming
convention. Use dashes only instead, and provide compat headers plus a
warning for those using the old header files.

Those users should be using xorg-gtest.h anyway.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net


So, basically this is one huge bike-shed commit. Since we're moving 
around what are supposed to be private implementation (even if it is in 
a public location), I'm ok with the change in theory. I'd rather leave 
it as is, but I have too many other things going on to care about this 
right now.


Reviewed-by: Chase Douglas chase.doug...@canonical.com
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH xorg-gtest] Rename headers to use dashes only

2012-07-03 Thread Chase Douglas

On 07/03/2012 07:47 AM, Chase Douglas wrote:

On 07/02/2012 08:17 PM, Peter Hutterer wrote:

Mixing dashes and spaces in xorg-gtest_foobar.h is a painful naming
convention. Use dashes only instead, and provide compat headers plus a
warning for those using the old header files.

Those users should be using xorg-gtest.h anyway.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net


So, basically this is one huge bike-shed commit. Since we're moving
around what are supposed to be private implementation (even if it is in
a public location), I'm ok with the change in theory. I'd rather leave
it as is, but I have too many other things going on to care about this
right now.

Reviewed-by: Chase Douglas chase.doug...@canonical.com


And pushed as b6dcdde9ecd63e2ea54ce0bfbeb4570a4d91a6c4.

-- Chase
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH xorg-gtest] Rename headers to use dashes only

2012-07-02 Thread Peter Hutterer
Mixing dashes and spaces in xorg-gtest_foobar.h is a painful naming
convention. Use dashes only instead, and provide compat headers plus a
warning for those using the old header files.

Those users should be using xorg-gtest.h anyway.

Signed-off-by: Peter Hutterer peter.hutte...@who-t.net
---
If the diff looks confusing, it is merely a
$ git mv xorg-gtest_device.h xorg-gtest-device.h
for all headers. The compat headers all now have stanza like this:
+#warning This header is deprecated. Include xorg-gtest-device.h instead
+#include xorg-gtest-device.h

The rest is the required search/replace of header file names inside the
other files.

 include/Makefile.am  |   14 +-
 include/xorg/gtest/evemu/xorg-gtest-device.h |   91 +
 include/xorg/gtest/evemu/xorg-gtest_device.h |   93 +
 include/xorg/gtest/xorg-gtest-environment.h  |  184 +
 include/xorg/gtest/xorg-gtest-process.h  |  166 +++
 include/xorg/gtest/xorg-gtest-test.h |  104 ++
 include/xorg/gtest/xorg-gtest.h  |8 +-
 include/xorg/gtest/xorg-gtest_device.h   |2 +
 include/xorg/gtest/xorg-gtest_environment.h  |  186 +-
 include/xorg/gtest/xorg-gtest_process.h  |  168 +--
 include/xorg/gtest/xorg-gtest_test.h |  106 +--
 src/device.cpp   |2 +-
 src/environment.cpp  |4 +-
 src/process.cpp  |2 +-
 src/test.cpp |2 +-
 src/xorg-gtest_main.cpp  |2 +-
 16 files changed, 576 insertions(+), 558 deletions(-)
 create mode 100644 include/xorg/gtest/evemu/xorg-gtest-device.h
 create mode 100644 include/xorg/gtest/xorg-gtest-environment.h
 create mode 100644 include/xorg/gtest/xorg-gtest-process.h
 create mode 100644 include/xorg/gtest/xorg-gtest-test.h
 create mode 100644 include/xorg/gtest/xorg-gtest_device.h

diff --git a/include/Makefile.am b/include/Makefile.am
index 6b39d0b..9ff5f2a 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -23,9 +23,17 @@
 # SOFTWARE.
 #
 
-nobase_include_HEADERS = \
+# compat headers, to be dropped in the future
+compat_headers =  \
xorg/gtest/xorg-gtest_environment.h \
xorg/gtest/xorg-gtest_process.h \
xorg/gtest/xorg-gtest_test.h \
-   xorg/gtest/evemu/xorg-gtest_device.h \
-   xorg/gtest/xorg-gtest.h
+   xorg/gtest/evemu/xorg-gtest_device.h
+
+nobase_include_HEADERS = \
+   xorg/gtest/xorg-gtest-environment.h \
+   xorg/gtest/xorg-gtest-process.h \
+   xorg/gtest/xorg-gtest-test.h \
+   xorg/gtest/evemu/xorg-gtest-device.h \
+   xorg/gtest/xorg-gtest.h \
+   $(compat_headers)
diff --git a/include/xorg/gtest/evemu/xorg-gtest-device.h 
b/include/xorg/gtest/evemu/xorg-gtest-device.h
new file mode 100644
index 000..5f8faa2
--- /dev/null
+++ b/include/xorg/gtest/evemu/xorg-gtest-device.h
@@ -0,0 +1,91 @@
+/***
+ *
+ * X testing environment - Google Test environment feat. dummy x server
+ *
+ * Copyright (C) 2012 Canonical Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the Software), to 
deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
THE
+ * SOFTWARE.
+ *
+ 
**/
+
+#ifndef XORG_GTEST_EVEMU_DEVICE_H_
+#define XORG_GTEST_EVEMU_DEVICE_H_
+
+#include memory
+#include string
+
+extern C {
+
+#include evemu.h
+
+} // extern C
+
+namespace xorg {
+namespace testing {
+namespace evemu {
+
+/**
+ * @class Device xorg-gtest_device.h xorg/gtest/evemu/xorg-gtest_device.h
+ *
+ * uTouch-Evemu input device for replaying events through the Linux uinput
+ * evdev subsystem.
+ *
+ * Use the Recording class to play back a specific recording.
+ */
+
+class Device {
+ public:
+  /**
+   * Create a new