summaryrefslogtreecommitdiffstats
path: root/test cases/frameworks/4 qt/subfolder/main.cpp
blob: 9661811dae513056a7ab1e124d2308e9c93b293a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <QImage>
#include <QFile>
#include <QString>

int main(int argc, char **argv) {
  #ifndef UNITY_BUILD
  Q_INIT_RESOURCE(stuff3);
  Q_INIT_RESOURCE(stuff4);
  #endif

  for(auto fname:{":/thing.png", ":/thing4.png"})
  {
    QImage img1(fname);
    if(img1.width() != 640) {
        return 1;
    }
  }

  for(auto fname:{":/txt_resource.txt",":/txt_resource2.txt"})
  {
    QFile file(fname);
    if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
      return 1;
    QString line = file.readLine();
    if(line.compare("Hello World"))
      return 1;
  }
  return 0;
}